Файловый менеджер - Редактировать - /home/c7lekhnath/silverray.com.au/Modules/Language/database/seeders/68334/TermsAndCondition.zip
Назад
PK :��Z lang/.gitkeepnu �[��� PK :��Z�_ module.jsonnu �[��� { "name": "TermsAndCondition", "alias": "termsandcondition", "description": "", "keywords": [], "priority": 0, "providers": [ "Modules\\TermsAndCondition\\app\\Providers\\TermsAndConditionServiceProvider" ], "files": [] } PK :��Z tests/Unit/.gitkeepnu �[��� PK :��Z tests/Feature/.gitkeepnu �[��� PK :��Z�j�P� � vite.config.jsnu �[��� import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; export default defineConfig({ build: { outDir: '../../public/build-termsandcondition', emptyOutDir: true, manifest: true, }, plugins: [ laravel({ publicDirectory: '../../public', buildDirectory: 'build-termsandcondition', input: [ __dirname + '/resources/assets/sass/app.scss', __dirname + '/resources/assets/js/app.js' ], refresh: true, }), ], }); //export const paths = [ // 'Modules/$STUDLY_NAME$/resources/assets/sass/app.scss', // 'Modules/$STUDLY_NAME$/resources/assets/js/app.js', //];PK :��Z routes/.gitkeepnu �[��� PK :��Z ��l l routes/error_lognu �[��� [07-May-2025 22:03:14 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\Facades\Route" not found in /home/lekhnath/silverray.com.au/Modules/TermsAndCondition/routes/api.php:17 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/TermsAndCondition/routes/api.php on line 17 [07-May-2025 22:51:06 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\Facades\Route" not found in /home/lekhnath/silverray.com.au/Modules/TermsAndCondition/routes/web.php:16 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/TermsAndCondition/routes/web.php on line 16 PK :��Z_/A� � routes/web.phpnu �[��� <?php use Illuminate\Support\Facades\Route; use Modules\TermsAndCondition\app\Http\Controllers\TermsAndConditionController; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | contains the "web" middleware group. Now create something great! | */ Route::middleware(['auth:admin', 'translation']) ->name('admin.') ->prefix('admin') ->group( function () { Route::get('terms-and-condition', [TermsAndConditionController::class, 'index'])->name('terms-and-condition'); Route::put('terms-and-condition-update', [TermsAndConditionController::class, 'update'])->name('terms-and-condition-update'); }); PK :��Zr[� � routes/api.phpnu �[��� <?php use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; /* |-------------------------------------------------------------------------- | API Routes |-------------------------------------------------------------------------- | | Here is where you can register API routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | is assigned the "api" middleware group. Enjoy building your API! | */ Route::middleware(['auth:sanctum'])->prefix('v1')->name('api.')->group(function () { Route::get('termsandcondition', fn (Request $request) => $request->user())->name('termsandcondition'); }); PK :��Z�7|� � composer.jsonnu �[��� { "name": "nwidart/termsandcondition", "description": "", "authors": [ { "name": "Nicolas Widart", "email": "n.widart@gmail.com" } ], "extra": { "laravel": { "providers": [], "aliases": { } } }, "autoload": { "psr-4": { "Modules\\TermsAndCondition\\": "", "Modules\\TermsAndCondition\\App\\": "app/", "Modules\\TermsAndCondition\\Database\\Factories\\": "database/factories/", "Modules\\TermsAndCondition\\Database\\Seeders\\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Modules\\TermsAndCondition\\Tests\\": "tests/" } } } PK :��Z�e��6 6 config/config.phpnu �[��� <?php return [ 'name' => 'TermsAndCondition', ]; PK :��Z config/.gitkeepnu �[��� PK :��Z��8� package.jsonnu �[��� { "private": true, "type": "module", "scripts": { "dev": "vite", "build": "vite build" }, "devDependencies": { "axios": "^1.1.2", "laravel-vite-plugin": "^0.7.5", "sass": "^1.69.5", "postcss": "^8.3.7", "vite": "^4.0.0" } } PK :��Z app/Http/Controllers/.gitkeepnu �[��� PK :��Z_�G� � 4 app/Http/Controllers/TermsAndConditionController.phpnu �[��� <?php namespace Modules\TermsAndCondition\app\Http\Controllers; use App\Enums\RedirectType; use Illuminate\Http\Request; use Illuminate\Http\Response; use App\Traits\RedirectHelperTrait; use App\Http\Controllers\Controller; use Illuminate\Http\RedirectResponse; use Modules\Language\app\Models\Language; use Modules\Language\app\Traits\GenerateTranslationTrait; use Modules\TermsAndCondition\app\Models\TermsAndCondition; use Modules\TermsAndCondition\app\Http\Requests\TermsAndConditionRequest; class TermsAndConditionController extends Controller { use RedirectHelperTrait, GenerateTranslationTrait; public function index() { checkAdminHasPermissionAndThrowException('terms.and.condition.view'); $terms_and_condition = TermsAndCondition::first(); $code = request('code') ?? getSessionLanguage(); if (!Language::where('code', $code)->exists()) { abort(404); } $languages = allLanguages(); return view('termsandcondition::index', compact('terms_and_condition', 'code', 'languages')); } public function update(TermsAndConditionRequest $request): RedirectResponse { checkAdminHasPermissionAndThrowException('terms.and.condition.update'); $validatedData = $request->validated(); $terms_and_condition = TermsAndCondition::first(); $this->updateTranslations( $terms_and_condition, $request, $validatedData, ); return $this->redirectWithMessage( RedirectType::UPDATE->value, 'admin.terms-and-condition', [ 'terms_and_condition' => $terms_and_condition->id, 'code' => $request->code, ] ); } } PK :��Z app/Http/Requests/.gitkeepnu �[��� PK :��Z��"�P P . app/Http/Requests/TermsAndConditionRequest.phpnu �[��� <?php namespace Modules\TermsAndCondition\app\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class TermsAndConditionRequest extends FormRequest { /** * Get the validation rules that apply to the request. */ public function rules(): array { $languages = allLanguages(); $rules = [ 'terms_and_condition' => 'required', ]; return $rules; } public function messages(): array { return [ 'terms_and_condition.required' => trans('Terms and condition is required'), ]; } } PK :��Z app/Http/Middleware/.gitkeepnu �[��� PK :��Z app/Models/.gitkeepnu �[��� PK :��Z�(��� � app/Models/error_lognu �[��� [11-May-2025 05:50:41 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Eloquent\Model" not found in /home/lekhnath/silverray.com.au/Modules/TermsAndCondition/app/Models/TermsAndConditionTranslation.php:9 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/TermsAndCondition/app/Models/TermsAndConditionTranslation.php on line 9 [11-May-2025 06:02:21 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Eloquent\Model" not found in /home/lekhnath/silverray.com.au/Modules/TermsAndCondition/app/Models/TermsAndCondition.php:12 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/TermsAndCondition/app/Models/TermsAndCondition.php on line 12 PK :��Z#�!� � app/Models/TermsAndCondition.phpnu �[��� <?php namespace Modules\TermsAndCondition\app\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Factories\HasFactory; use Modules\TermsAndCondition\app\Models\TermsAndConditionTranslation; use Modules\TermsAndCondition\Database\factories\TermsAndConditionFactory; class TermsAndCondition extends Model { use HasFactory; /** * The attributes that are mass assignable. */ protected $fillable = []; protected static function newFactory(): TermsAndConditionFactory { //return TermsAndConditionFactory::new(); } public function getTranslation($code): ?TermsAndConditionTranslation { return $this->hasOne(TermsAndConditionTranslation::class)->where('lang_code', $code)->first(); } public function translations(): ?HasMany { return $this->hasMany(TermsAndConditionTranslation::class, 'terms_and_condition_id'); } public function translation(): ?HasOne { return $this->hasOne(TermsAndConditionTranslation::class, 'terms_and_condition_id')->where('lang_code', getSessionLanguage()); } } PK :��ZOi��I I + app/Models/TermsAndConditionTranslation.phpnu �[��� <?php namespace Modules\TermsAndCondition\app\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Factories\HasFactory; use Modules\TermsAndCondition\Database\factories\TermsAndConditionTranslationFactory; class TermsAndConditionTranslation extends Model { use HasFactory; /** * The attributes that are mass assignable. */ protected $fillable = ['terms_and_condition']; protected static function newFactory(): TermsAndConditionTranslationFactory { //return TermsAndConditionTranslationFactory::new(); } } PK :��Z&$� � &