diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php deleted file mode 100644 index 249c825..0000000 --- a/app/Exceptions/Handler.php +++ /dev/null @@ -1,44 +0,0 @@ -, \Psr\Log\LogLevel::*> - */ - protected $levels = [ - // - ]; - - /** - * A list of the exception types that are not reported. - * - * @var array> - */ - protected $dontReport = [ - // - ]; - - /** - * A list of the inputs that are never flashed to the session on validation exceptions. - * - * @var array - */ - protected $dontFlash = ['current_password', 'password', 'password_confirmation']; - - /** - * Register the exception handling callbacks for the application. - */ - public function register(): void - { - $this->reportable(function (Throwable $e) { - // - }); - } -} diff --git a/app/Filament/Resources/CityResource/Pages/CreateCity.php b/app/Filament/Resources/CityResource/Pages/CreateCity.php deleted file mode 100644 index 674d566..0000000 --- a/app/Filament/Resources/CityResource/Pages/CreateCity.php +++ /dev/null @@ -1,16 +0,0 @@ -previousUrl ?? $this->getResource()::getUrl('index'); - } -} diff --git a/app/Filament/Resources/CityResource/Pages/EditCity.php b/app/Filament/Resources/CityResource/Pages/EditCity.php deleted file mode 100644 index 3cf73b7..0000000 --- a/app/Filament/Resources/CityResource/Pages/EditCity.php +++ /dev/null @@ -1,24 +0,0 @@ -previousUrl ?? $this->getResource()::getUrl('index'); - } -} diff --git a/app/Filament/Resources/CountryResource/Pages/CreateCountry.php b/app/Filament/Resources/CountryResource/Pages/CreateCountry.php deleted file mode 100644 index 53d1e3e..0000000 --- a/app/Filament/Resources/CountryResource/Pages/CreateCountry.php +++ /dev/null @@ -1,16 +0,0 @@ -previousUrl ?? $this->getResource()::getUrl('index'); - } -} diff --git a/app/Filament/Resources/CountryResource/Pages/EditCountry.php b/app/Filament/Resources/CountryResource/Pages/EditCountry.php deleted file mode 100644 index e51a37b..0000000 --- a/app/Filament/Resources/CountryResource/Pages/EditCountry.php +++ /dev/null @@ -1,27 +0,0 @@ -previousUrl ?? $this->getResource()::getUrl('index'); - } -} diff --git a/app/Filament/Resources/StateResource/Pages/CreateState.php b/app/Filament/Resources/StateResource/Pages/CreateState.php deleted file mode 100644 index 0f9bd30..0000000 --- a/app/Filament/Resources/StateResource/Pages/CreateState.php +++ /dev/null @@ -1,16 +0,0 @@ -previousUrl ?? $this->getResource()::getUrl('index'); - } -} diff --git a/app/Filament/Resources/StateResource/Pages/EditState.php b/app/Filament/Resources/StateResource/Pages/EditState.php deleted file mode 100644 index c625745..0000000 --- a/app/Filament/Resources/StateResource/Pages/EditState.php +++ /dev/null @@ -1,25 +0,0 @@ -previousUrl ?? $this->getResource()::getUrl('index'); - } -} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php deleted file mode 100644 index cc0101f..0000000 --- a/app/Http/Kernel.php +++ /dev/null @@ -1,69 +0,0 @@ - - */ - protected $middleware = [ - // \App\Http\Middleware\TrustHosts::class, - \App\Http\Middleware\TrustProxies::class, - \Illuminate\Http\Middleware\HandleCors::class, - \App\Http\Middleware\PreventRequestsDuringMaintenance::class, - \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, - \App\Http\Middleware\TrimStrings::class, - \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, - ]; - - /** - * The application's route middleware groups. - * - * @var array> - */ - protected $middlewareGroups = [ - 'web' => [ - \App\Http\Middleware\EncryptCookies::class, - \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, - \Illuminate\Session\Middleware\StartSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\VerifyCsrfToken::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - \App\Http\Middleware\HandleInertiaRequests::class, - \Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets::class, - ], - - 'api' => [ - // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, - 'throttle:api', - \Illuminate\Routing\Middleware\SubstituteBindings::class, - ], - ]; - - /** - * The application's route middleware. - * - * These middleware may be assigned to groups or used individually. - * - * @var array - */ - protected $middlewareAliases = [ - 'auth' => \App\Http\Middleware\Authenticate::class, - 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, - 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, - 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, - 'can' => \Illuminate\Auth\Middleware\Authorize::class, - 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, - 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, - 'signed' => \App\Http\Middleware\ValidateSignature::class, - 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, - 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, - ]; -} diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php deleted file mode 100644 index d4ef644..0000000 --- a/app/Http/Middleware/Authenticate.php +++ /dev/null @@ -1,17 +0,0 @@ -expectsJson() ? null : route('login'); - } -} diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php deleted file mode 100644 index 867695b..0000000 --- a/app/Http/Middleware/EncryptCookies.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - protected $except = [ - // - ]; -} diff --git a/app/Http/Middleware/PreventRequestsDuringMaintenance.php b/app/Http/Middleware/PreventRequestsDuringMaintenance.php deleted file mode 100644 index 74cbd9a..0000000 --- a/app/Http/Middleware/PreventRequestsDuringMaintenance.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - protected $except = [ - // - ]; -} diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php deleted file mode 100644 index e6ebeb4..0000000 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ /dev/null @@ -1,30 +0,0 @@ -check()) { - return redirect(RouteServiceProvider::HOME); - } - } - - return $next($request); - } -} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php deleted file mode 100644 index 0879173..0000000 --- a/app/Http/Middleware/TrimStrings.php +++ /dev/null @@ -1,15 +0,0 @@ - - */ - protected $except = ['current_password', 'password', 'password_confirmation']; -} diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php deleted file mode 100644 index 30a14aa..0000000 --- a/app/Http/Middleware/TrustHosts.php +++ /dev/null @@ -1,18 +0,0 @@ - - */ - public function hosts(): array - { - return [$this->allSubdomainsOfApplicationUrl()]; - } -} diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php deleted file mode 100644 index 3391630..0000000 --- a/app/Http/Middleware/TrustProxies.php +++ /dev/null @@ -1,28 +0,0 @@ -|string|null - */ - protected $proxies; - - /** - * The headers that should be used to detect proxies. - * - * @var int - */ - protected $headers = - Request::HEADER_X_FORWARDED_FOR | - Request::HEADER_X_FORWARDED_HOST | - Request::HEADER_X_FORWARDED_PORT | - Request::HEADER_X_FORWARDED_PROTO | - Request::HEADER_X_FORWARDED_AWS_ELB; -} diff --git a/app/Http/Middleware/ValidateSignature.php b/app/Http/Middleware/ValidateSignature.php deleted file mode 100644 index 093bf64..0000000 --- a/app/Http/Middleware/ValidateSignature.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ - protected $except = [ - // 'fbclid', - // 'utm_campaign', - // 'utm_content', - // 'utm_medium', - // 'utm_source', - // 'utm_term', - ]; -} diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php deleted file mode 100644 index 5522aa2..0000000 --- a/app/Providers/AuthServiceProvider.php +++ /dev/null @@ -1,28 +0,0 @@ - - */ - protected $policies = [ - // 'App\Models\Model' => 'App\Policies\ModelPolicy', - ]; - - /** - * Register any authentication / authorization services. - */ - public function boot(): void - { - $this->registerPolicies(); - - // - } -} diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php deleted file mode 100644 index 2be04f5..0000000 --- a/app/Providers/BroadcastServiceProvider.php +++ /dev/null @@ -1,19 +0,0 @@ -put($path, file_get_contents($imageURL)); - - return $path; - } -} diff --git a/config/broadcasting.php b/config/broadcasting.php deleted file mode 100644 index 951560d..0000000 --- a/config/broadcasting.php +++ /dev/null @@ -1,66 +0,0 @@ - env('BROADCAST_DRIVER', 'null'), - - /* - |-------------------------------------------------------------------------- - | Broadcast Connections - |-------------------------------------------------------------------------- - | - | Here you may define all of the broadcast connections that will be used - | to broadcast events to other systems or over websockets. Samples of - | each available type of connection are provided inside this array. - | - */ - - 'connections' => [ - 'pusher' => [ - 'driver' => 'pusher', - 'key' => env('PUSHER_APP_KEY'), - 'secret' => env('PUSHER_APP_SECRET'), - 'app_id' => env('PUSHER_APP_ID'), - 'options' => [ - 'host' => env('PUSHER_HOST') ?: 'api-' . env('PUSHER_APP_CLUSTER', 'mt1') . '.pusher.com', - 'port' => env('PUSHER_PORT', 443), - 'scheme' => env('PUSHER_SCHEME', 'https'), - 'encrypted' => true, - 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', - ], - 'client_options' => [ - // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html - ], - ], - - 'ably' => [ - 'driver' => 'ably', - 'key' => env('ABLY_KEY'), - ], - - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - ], - - 'log' => [ - 'driver' => 'log', - ], - - 'null' => [ - 'driver' => 'null', - ], - ], -]; diff --git a/config/cors.php b/config/cors.php deleted file mode 100644 index 9a2fcfb..0000000 --- a/config/cors.php +++ /dev/null @@ -1,32 +0,0 @@ - ['api/*', 'sanctum/csrf-cookie'], - - 'allowed_methods' => ['*'], - - 'allowed_origins' => ['*'], - - 'allowed_origins_patterns' => [], - - 'allowed_headers' => ['*'], - - 'exposed_headers' => [], - - 'max_age' => 0, - - 'supports_credentials' => false, -]; diff --git a/config/hashing.php b/config/hashing.php deleted file mode 100644 index 552f2bb..0000000 --- a/config/hashing.php +++ /dev/null @@ -1,50 +0,0 @@ - 'bcrypt', - - /* - |-------------------------------------------------------------------------- - | Bcrypt Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Bcrypt algorithm. This will allow you - | to control the amount of time it takes to hash the given password. - | - */ - - 'bcrypt' => [ - 'rounds' => env('BCRYPT_ROUNDS', 10), - ], - - /* - |-------------------------------------------------------------------------- - | Argon Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Argon algorithm. These will allow you - | to control the amount of time it takes to hash the given password. - | - */ - - 'argon' => [ - 'memory' => 65536, - 'threads' => 1, - 'time' => 4, - ], -]; diff --git a/config/view.php b/config/view.php deleted file mode 100644 index 121f965..0000000 --- a/config/view.php +++ /dev/null @@ -1,29 +0,0 @@ - [resource_path('views')], - - /* - |-------------------------------------------------------------------------- - | Compiled View Path - |-------------------------------------------------------------------------- - | - | This option determines where all the compiled Blade templates will be - | stored for your application. Typically, this is within the storage - | directory. However, as usual, you are free to change this value. - | - */ - - 'compiled' => env('VIEW_COMPILED_PATH', realpath(storage_path('framework/views'))), -]; diff --git a/database/factories/CityFactory.php b/database/factories/CityFactory.php deleted file mode 100644 index 92650b3..0000000 --- a/database/factories/CityFactory.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ -class CityFactory extends Factory -{ - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'uuid' => fake()->uuid, - 'state_id' => State::inRandomOrder()->value('id'), - 'name' => fake()->city, - ]; - } -} diff --git a/database/factories/CountryFactory.php b/database/factories/CountryFactory.php deleted file mode 100644 index 7f01a72..0000000 --- a/database/factories/CountryFactory.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ -class CountryFactory extends Factory -{ - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'name' => fake()->country, - 'capital' => fake()->city, - 'iso2' => fake()->countryCode, - 'iso3' => fake()->countryISOAlpha3, - 'phone_code' => fake()->phoneNumber, - 'currency' => fake()->currencyCode, - 'tld' => strtolower('.' . fake()->currencyCode), - 'region' => Country::getRegions()[rand(0, count(Country::getRegions()) - 1)], - 'is_active' => fake()->boolean(22), - ]; - } -} diff --git a/database/factories/StateFactory.php b/database/factories/StateFactory.php deleted file mode 100644 index 40dd9bc..0000000 --- a/database/factories/StateFactory.php +++ /dev/null @@ -1,29 +0,0 @@ - - */ -class StateFactory extends Factory -{ - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'uuid' => fake()->uuid, - 'name' => fake()->city, - 'country_id' => Country::inRandomOrder()->value('id'), - 'type' => Arr::random(State::$types), - ]; - } -} diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php deleted file mode 100644 index 444fafb..0000000 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->string('name'); - $table->string('email')->unique(); - $table->timestamp('email_verified_at')->nullable(); - $table->string('password'); - $table->rememberToken(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('users'); - } -}; diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php deleted file mode 100644 index e207aaa..0000000 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ /dev/null @@ -1,28 +0,0 @@ -string('email')->primary(); - $table->string('token'); - $table->timestamp('created_at')->nullable(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('password_resets'); - } -}; diff --git a/database/migrations/2019_05_03_000001_create_customer_columns.php b/database/migrations/2019_05_03_000001_create_customer_columns.php deleted file mode 100644 index abd05cc..0000000 --- a/database/migrations/2019_05_03_000001_create_customer_columns.php +++ /dev/null @@ -1,36 +0,0 @@ -string('stripe_id')->after('remember_token')->nullable()->index(); - $table->string('pm_type')->after('stripe_id')->nullable(); - $table->string('pm_last_four', 4)->after('pm_type')->nullable(); - $table->timestamp('trial_ends_at')->after('pm_last_four')->nullable(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('users', function (Blueprint $table) { - $table->dropColumn([ - 'stripe_id', - 'pm_type', - 'pm_last_four', - 'trial_ends_at', - ]); - }); - } -}; diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php deleted file mode 100644 index 249da81..0000000 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->string('uuid')->unique(); - $table->text('connection'); - $table->text('queue'); - $table->longText('payload'); - $table->longText('exception'); - $table->timestamp('failed_at')->useCurrent(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('failed_jobs'); - } -}; diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php deleted file mode 100644 index e828ad8..0000000 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->morphs('tokenable'); - $table->string('name'); - $table->string('token', 64)->unique(); - $table->text('abilities')->nullable(); - $table->timestamp('last_used_at')->nullable(); - $table->timestamp('expires_at')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('personal_access_tokens'); - } -}; diff --git a/database/migrations/2023_02_22_220200_add_columns_to_users_table.php b/database/migrations/2023_02_22_220200_add_columns_to_users_table.php deleted file mode 100644 index 6df63c4..0000000 --- a/database/migrations/2023_02_22_220200_add_columns_to_users_table.php +++ /dev/null @@ -1,39 +0,0 @@ -dropColumn('name'); - $table->string('first_name', 50)->after('id'); - $table->string('last_name', 50)->after('first_name'); - $table->date('birth_date')->after('last_name')->nullable(); - $table->enum('gender', UserGender::getValues())->after('birth_date')->nullable(); - $table->enum('status', UserStatus::getValues())->after('gender')->default('active'); - $table->string('phone')->after('status')->nullable(); - $table->softDeletes()->after('updated_at'); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('users', function (Blueprint $table) { - $table->string('name')->after('id'); - $table->dropColumn(['first_name', 'last_name', 'birth_date', 'gender', 'status', 'phone']); - $table->dropSoftDeletes(); - }); - } -}; diff --git a/database/migrations/2023_02_22_220205_create_user_addresses_table.php b/database/migrations/2023_02_22_220205_create_user_addresses_table.php deleted file mode 100644 index 3ec5699..0000000 --- a/database/migrations/2023_02_22_220205_create_user_addresses_table.php +++ /dev/null @@ -1,40 +0,0 @@ -id(); - $table->foreignIdFor(User::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->boolean('is_main')->default(false); - $table->foreignIdFor(Country::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->foreignIdFor(State::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->foreignIdFor(City::class)->nullable()->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->string('street'); - $table->string('house', 10); - $table->string('flat', 10)->nullable(); - $table->string('postal_code', 10)->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('user_addresses'); - } -}; diff --git a/database/migrations/2023_02_22_220206_create_user_socials_table.php b/database/migrations/2023_02_22_220206_create_user_socials_table.php deleted file mode 100644 index c000825..0000000 --- a/database/migrations/2023_02_22_220206_create_user_socials_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->foreignIdFor(User::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->enum('provider', UserProvider::getValues()); - $table->string('provider_id'); - $table->string('provider_token'); - $table->timestamps(); - - $table->unique(['provider', 'provider_id']); - }); - - Schema::table('users', fn (Blueprint $table) => $table->string('password')->nullable()->change()); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('user_socials'); - Schema::table('users', fn (Blueprint $table) => $table->string('password')->nullable(false)->change()); - } -}; diff --git a/database/migrations/2023_02_22_220207_create_settings_table.php b/database/migrations/2023_02_22_220207_create_settings_table.php deleted file mode 100644 index f0088cd..0000000 --- a/database/migrations/2023_02_22_220207_create_settings_table.php +++ /dev/null @@ -1,34 +0,0 @@ -id(); - $table->string('group', 50); - $table->string('name', 50)->nullable(); - $table->string('details')->nullable(); - $table->string('key', 50); - $table->text('value'); - $table->timestamps(); - - $table->unique(['group', 'key']); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('settings'); - } -}; diff --git a/database/migrations/2023_02_22_220208_create_brands_table.php b/database/migrations/2023_02_22_220208_create_brands_table.php deleted file mode 100644 index 0e8c0d6..0000000 --- a/database/migrations/2023_02_22_220208_create_brands_table.php +++ /dev/null @@ -1,30 +0,0 @@ -id(); - $table->string('name', 100); - $table->string('slug', 100)->unique(); - $table->string('url')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('brands'); - } -}; diff --git a/database/migrations/2023_02_22_220209_create_categories_table.php b/database/migrations/2023_02_22_220209_create_categories_table.php deleted file mode 100644 index f85082c..0000000 --- a/database/migrations/2023_02_22_220209_create_categories_table.php +++ /dev/null @@ -1,35 +0,0 @@ -id(); - $table->string('title', 100); - $table->string('slug', 100)->unique(); - $table->string('description')->nullable(); - $table->boolean('is_active')->default(true); - $table->boolean('is_navigational')->default(true); - $table->foreignId('parent_id')->nullable()->constrained('categories')->cascadeOnUpdate()->cascadeOnDelete(); - $table->string('manual_url')->nullable(); - $table->timestamps(); - $table->softDeletes(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('categories'); - } -}; diff --git a/database/migrations/2023_02_22_220210_create_goods_table.php b/database/migrations/2023_02_22_220210_create_goods_table.php deleted file mode 100644 index b6da806..0000000 --- a/database/migrations/2023_02_22_220210_create_goods_table.php +++ /dev/null @@ -1,46 +0,0 @@ -id(); - $table->bigInteger('vendor_code')->unique(); - $table->string('title'); - $table->string('slug')->unique(); - $table->foreignIdFor(Category::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->foreignIdFor(Brand::class)->nullable()->constrained()->cascadeOnUpdate()->nullOnDelete(); - $table->text('description')->nullable(); - $table->text('short_description')->nullable(); - $table->text('warning_description')->nullable(); - $table->unsignedDecimal('old_price')->nullable(); - $table->unsignedDecimal('price'); - $table->unsignedInteger('quantity')->default(0); - $table->enum('status', GoodStatus::getValues()); - $table->json('options')->nullable(); - $table->timestamps(); - - $table->softDeletes(); - $table->fullText(['title', 'description']); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('goods'); - } -}; diff --git a/database/migrations/2023_02_22_220211_create_tags_table.php b/database/migrations/2023_02_22_220211_create_tags_table.php deleted file mode 100644 index e2b8c7f..0000000 --- a/database/migrations/2023_02_22_220211_create_tags_table.php +++ /dev/null @@ -1,29 +0,0 @@ -id(); - $table->string('name', 50); - $table->string('slug', 50)->unique(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('tags'); - } -}; diff --git a/database/migrations/2023_02_22_220212_create_properties_table.php b/database/migrations/2023_02_22_220212_create_properties_table.php deleted file mode 100644 index 8b54a81..0000000 --- a/database/migrations/2023_02_22_220212_create_properties_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->foreignIdFor(Category::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->string('name'); - $table->string('slug')->unique(); - $table->boolean('filterable'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('properties'); - } -}; diff --git a/database/migrations/2023_02_22_220213_create_good_property_table.php b/database/migrations/2023_02_22_220213_create_good_property_table.php deleted file mode 100644 index d0c39a2..0000000 --- a/database/migrations/2023_02_22_220213_create_good_property_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->foreignIdFor(Property::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->foreignIdFor(Good::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->string('value', 100); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('good_property'); - } -}; diff --git a/database/migrations/2023_02_22_220214_create_good_tag_table.php b/database/migrations/2023_02_22_220214_create_good_tag_table.php deleted file mode 100644 index 25e165d..0000000 --- a/database/migrations/2023_02_22_220214_create_good_tag_table.php +++ /dev/null @@ -1,31 +0,0 @@ -id(); - $table->foreignIdFor(Good::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->foreignIdFor(Tag::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('good_tag'); - } -}; diff --git a/database/migrations/2023_02_22_220215_create_good_user_table.php b/database/migrations/2023_02_22_220215_create_good_user_table.php deleted file mode 100644 index b34d0a5..0000000 --- a/database/migrations/2023_02_22_220215_create_good_user_table.php +++ /dev/null @@ -1,31 +0,0 @@ -id(); - $table->foreignIdFor(Good::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->foreignIdFor(User::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('good_user'); - } -}; diff --git a/database/migrations/2023_02_22_220216_create_reviews_table.php b/database/migrations/2023_02_22_220216_create_reviews_table.php deleted file mode 100644 index be9acda..0000000 --- a/database/migrations/2023_02_22_220216_create_reviews_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->foreignIdFor(User::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->foreignIdFor(Good::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->boolean('is_buyer')->default(true); - $table->text('content'); - $table->tinyText('advantages'); - $table->tinyText('disadvantages'); - $table->unsignedTinyInteger('rating'); - $table->string('video_src')->nullable(); - $table->ipAddress()->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('reviews'); - } -}; diff --git a/database/migrations/2023_02_22_220217_create_cart_items_table.php b/database/migrations/2023_02_22_220217_create_cart_items_table.php deleted file mode 100644 index e7220aa..0000000 --- a/database/migrations/2023_02_22_220217_create_cart_items_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->foreignIdFor(User::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->foreignIdFor(Good::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->unsignedTinyInteger('quantity')->default(1); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('cart_items'); - } -}; diff --git a/database/migrations/2023_02_22_220218_create_promo_codes_table.php b/database/migrations/2023_02_22_220218_create_promo_codes_table.php deleted file mode 100644 index 59434ab..0000000 --- a/database/migrations/2023_02_22_220218_create_promo_codes_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->string('key', 50)->unique(); - $table->enum('type', PromoCode::getValues()); - $table->unsignedSmallInteger('value'); - $table->string('description'); - $table->integer('used_times')->default(0); - $table->dateTime('starts_at')->nullable(); - $table->dateTime('expires_at')->nullable(); - $table->unsignedDecimal('greater_than')->nullable(); - $table->boolean('is_active')->default(true); - $table->boolean('is_public')->default(false); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('promo_codes'); - } -}; diff --git a/database/migrations/2023_02_22_220219_create_orders_table.php b/database/migrations/2023_02_22_220219_create_orders_table.php deleted file mode 100644 index 0987bf7..0000000 --- a/database/migrations/2023_02_22_220219_create_orders_table.php +++ /dev/null @@ -1,44 +0,0 @@ -id(); - $table->uuid()->unique()->index(); - $table->foreignIdFor(User::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->foreignIdFor(UserAddress::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->foreignIdFor(PromoCode::class)->nullable()->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->enum('delivery_method', OrderDelivery::getValues()); - $table->enum('payment_method', OrderPayment::getValues()); - $table->unsignedDecimal('goods_cost'); - $table->unsignedDecimal('delivery_cost')->nullable()->default(0); - $table->unsignedDecimal('total_cost'); - $table->enum('status', OrderStatus::getValues())->default(OrderStatus::UNPAID); - $table->json('status_history')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('orders'); - } -}; diff --git a/database/migrations/2023_02_22_220220_create_order_items_table.php b/database/migrations/2023_02_22_220220_create_order_items_table.php deleted file mode 100644 index e18d712..0000000 --- a/database/migrations/2023_02_22_220220_create_order_items_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->foreignIdFor(Order::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->foreignIdFor(Good::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->unsignedTinyInteger('quantity')->default(1); - $table->unsignedDecimal('unit_price')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('order_items'); - } -}; diff --git a/database/migrations/2023_02_22_220221_create_order_recipients_table.php b/database/migrations/2023_02_22_220221_create_order_recipients_table.php deleted file mode 100644 index a87e1bb..0000000 --- a/database/migrations/2023_02_22_220221_create_order_recipients_table.php +++ /dev/null @@ -1,38 +0,0 @@ -id(); - $table->foreignIdFor(User::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->string('title'); - $table->string('first_name', 50); - $table->string('last_name', 50); - $table->string('second_name', 50)->nullable(); - $table->string('phone', 13); - $table->string('description')->nullable(); - $table->boolean('is_default')->default(false); - $table->timestamps(); - - $table->unique(['user_id', 'title']); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('order_recipients'); - } -}; diff --git a/database/migrations/2023_02_22_220222_create_order_payments_table.php b/database/migrations/2023_02_22_220222_create_order_payments_table.php deleted file mode 100644 index 9af2ec7..0000000 --- a/database/migrations/2023_02_22_220222_create_order_payments_table.php +++ /dev/null @@ -1,34 +0,0 @@ -id(); - $table->foreignIdFor(Order::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); - $table->unsignedDecimal('amount'); - $table->string('status')->nullable(); - $table->enum('type', OrderPayment::$types); - $table->uuid('session_id')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('order_payments'); - } -}; diff --git a/database/migrations/2023_02_22_220223_create_media_table.php b/database/migrations/2023_02_22_220223_create_media_table.php deleted file mode 100644 index 47a4be9..0000000 --- a/database/migrations/2023_02_22_220223_create_media_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - - $table->morphs('model'); - $table->uuid()->nullable()->unique(); - $table->string('collection_name'); - $table->string('name'); - $table->string('file_name'); - $table->string('mime_type')->nullable(); - $table->string('disk'); - $table->string('conversions_disk')->nullable(); - $table->unsignedBigInteger('size'); - $table->json('manipulations'); - $table->json('custom_properties'); - $table->json('generated_conversions'); - $table->json('responsive_images'); - $table->unsignedInteger('order_column')->nullable()->index(); - - $table->nullableTimestamps(); - }); - } -}; diff --git a/database/migrations/2023_02_22_220224_create_permission_tables.php b/database/migrations/2023_02_22_220224_create_permission_tables.php deleted file mode 100644 index 588ac19..0000000 --- a/database/migrations/2023_02_22_220224_create_permission_tables.php +++ /dev/null @@ -1,138 +0,0 @@ -bigIncrements('id'); // permission id - $table->string('name'); // For MySQL 8.0 use string('name', 125); - $table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125); - $table->timestamps(); - - $table->unique(['name', 'guard_name']); - }); - - Schema::create($tableNames['roles'], function (Blueprint $table) use ($teams, $columnNames) { - $table->bigIncrements('id'); // role id - if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing - $table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable(); - $table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index'); - } - $table->string('name'); // For MySQL 8.0 use string('name', 125); - $table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125); - $table->timestamps(); - if ($teams || config('permission.testing')) { - $table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']); - } else { - $table->unique(['name', 'guard_name']); - } - }); - - Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames, $pivotPermission, $teams) { - $table->unsignedBigInteger($pivotPermission); - - $table->string('model_type'); - $table->unsignedBigInteger($columnNames['model_morph_key']); - $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index'); - - $table->foreign($pivotPermission) - ->references('id') // permission id - ->on($tableNames['permissions']) - ->onDelete('cascade'); - if ($teams) { - $table->unsignedBigInteger($columnNames['team_foreign_key']); - $table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index'); - - $table->primary([$columnNames['team_foreign_key'], $pivotPermission, $columnNames['model_morph_key'], 'model_type'], - 'model_has_permissions_permission_model_type_primary'); - } else { - $table->primary([$pivotPermission, $columnNames['model_morph_key'], 'model_type'], - 'model_has_permissions_permission_model_type_primary'); - } - - }); - - Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames, $pivotRole, $teams) { - $table->unsignedBigInteger($pivotRole); - - $table->string('model_type'); - $table->unsignedBigInteger($columnNames['model_morph_key']); - $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index'); - - $table->foreign($pivotRole) - ->references('id') // role id - ->on($tableNames['roles']) - ->onDelete('cascade'); - if ($teams) { - $table->unsignedBigInteger($columnNames['team_foreign_key']); - $table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index'); - - $table->primary([$columnNames['team_foreign_key'], $pivotRole, $columnNames['model_morph_key'], 'model_type'], - 'model_has_roles_role_model_type_primary'); - } else { - $table->primary([$pivotRole, $columnNames['model_morph_key'], 'model_type'], - 'model_has_roles_role_model_type_primary'); - } - }); - - Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames, $pivotRole, $pivotPermission) { - $table->unsignedBigInteger($pivotPermission); - $table->unsignedBigInteger($pivotRole); - - $table->foreign($pivotPermission) - ->references('id') // permission id - ->on($tableNames['permissions']) - ->onDelete('cascade'); - - $table->foreign($pivotRole) - ->references('id') // role id - ->on($tableNames['roles']) - ->onDelete('cascade'); - - $table->primary([$pivotPermission, $pivotRole], 'role_has_permissions_permission_id_role_id_primary'); - }); - - app('cache') - ->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) - ->forget(config('permission.cache.key')); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - $tableNames = config('permission.table_names'); - - if (empty($tableNames)) { - throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.'); - } - - Schema::drop($tableNames['role_has_permissions']); - Schema::drop($tableNames['model_has_roles']); - Schema::drop($tableNames['model_has_permissions']); - Schema::drop($tableNames['roles']); - Schema::drop($tableNames['permissions']); - } -}; diff --git a/resources/js/app.js b/resources/js/app.js deleted file mode 100644 index ebb5190..0000000 --- a/resources/js/app.js +++ /dev/null @@ -1,36 +0,0 @@ -import './bootstrap' -import '../css/app.css' - -import { createApp, h } from 'vue' -import { createInertiaApp } from '@inertiajs/vue3' -import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers' -import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m' -import { library, dom } from '@fortawesome/fontawesome-svg-core' -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' -import { fas } from '@fortawesome/free-solid-svg-icons' -import { far } from '@fortawesome/free-regular-svg-icons' -import { fab } from '@fortawesome/free-brands-svg-icons' -import VueSplide from '@splidejs/vue-splide' -import Notifications from '@kyvg/vue3-notification' - -library.add(fas, far, fab) -dom.watch() - -const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'brandford.' - -createInertiaApp({ - title: (title) => `${title} – ${appName}`, - resolve: (name) => resolvePageComponent(`./Pages/${name}.vue`, import.meta.glob('./Pages/**/*.vue')), - setup({ el, App, props, plugin }) { - return createApp({ render: () => h(App, props) }) - .component('font-awesome-icon', FontAwesomeIcon) - .use(plugin) - .use(ZiggyVue, Ziggy) - .use(VueSplide) - .use(Notifications) - .mount(el) - }, - progress: { - color: '#5850ec' - } -}) diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js deleted file mode 100644 index 7020e74..0000000 --- a/resources/js/bootstrap.js +++ /dev/null @@ -1,35 +0,0 @@ -import _ from 'lodash' -window._ = _ - -/** - * We'll load the axios HTTP library which allows us to easily issue requests - * to our Laravel back-end. This library automatically handles sending the - * CSRF token as a header based on the value of the "XSRF" token cookie. - */ - -import axios from 'axios' -window.axios = axios - -window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest' - -/** - * Echo exposes an expressive API for subscribing to channels and listening - * for events that are broadcast by Laravel. Echo and event broadcasting - * allows your team to easily build robust real-time web applications. - */ - -// import Echo from 'laravel-echo'; - -// import Pusher from 'pusher-js'; -// window.Pusher = Pusher; - -// window.Echo = new Echo({ -// broadcaster: 'pusher', -// key: import.meta.env.VITE_PUSHER_APP_KEY, -// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1', -// wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, -// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, -// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, -// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', -// enabledTransports: ['ws', 'wss'], -// }); diff --git a/resources/js/composables/format.js b/resources/js/composables/format.js deleted file mode 100644 index 4eb8da9..0000000 --- a/resources/js/composables/format.js +++ /dev/null @@ -1,12 +0,0 @@ -export function useFormat() { - const formatMoney = (value, format = 'ua', asCurrency = true, currency = 'USD') => { - return new Intl.NumberFormat(format, { - style: asCurrency ? 'currency' : 'decimal', - currency - }).format(value) - } - - const formatCardNumber = (cardNumber) => (cardNumber ? cardNumber.match(/.{1,4}/g).join(' ') : '') - - return { formatMoney, formatCardNumber } -} diff --git a/resources/js/ssr.js b/resources/js/ssr.js deleted file mode 100644 index 2ce0830..0000000 --- a/resources/js/ssr.js +++ /dev/null @@ -1,25 +0,0 @@ -import { createSSRApp, h } from 'vue' -import { renderToString } from '@vue/server-renderer' -import { createInertiaApp } from '@inertiajs/vue3' -import createServer from '@inertiajs/vue3/server' -import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers' -import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m' - -const appName = 'brandford.' - -createServer((page) => - createInertiaApp({ - page, - render: renderToString, - title: (title) => `${title} – ${appName}`, - resolve: (name) => resolvePageComponent(`./Pages/${name}.vue`, import.meta.glob('./Pages/**/*.vue')), - setup({ App, props, plugin }) { - return createSSRApp({ render: () => h(App, props) }) - .use(plugin) - .use(ZiggyVue, { - ...page.props.ziggy, - location: new URL(page.props.ziggy.location) - }) - } - }) -) diff --git a/routes/channels.php b/routes/channels.php deleted file mode 100644 index cdd4fcb..0000000 --- a/routes/channels.php +++ /dev/null @@ -1,18 +0,0 @@ -id === (int) $id; -});