restore composer.json, add mysqli extension
This commit is contained in:
1
database/.gitignore
vendored
Executable file
1
database/.gitignore
vendored
Executable file
@@ -0,0 +1 @@
|
||||
*.sqlite*
|
||||
44
database/factories/UserFactory.php
Executable file
44
database/factories/UserFactory.php
Executable file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The current password being used by the factory.
|
||||
*/
|
||||
protected static ?string $password;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => static::$password ??= Hash::make('password'),
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the model's email address should be unverified.
|
||||
*/
|
||||
public function unverified(): static
|
||||
{
|
||||
return $this->state(fn(array $attributes) => [
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
43
database/migrations/2014_10_12_000000_create_users_table.php
Executable file
43
database/migrations/2014_10_12_000000_create_users_table.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('avatar')->nullable();
|
||||
$table->string('password')->nullable();
|
||||
|
||||
$table->unsignedInteger('role_id')->default(2);
|
||||
$table->string('email')->nullable();
|
||||
$table->unsignedBigInteger('phone')->unique();
|
||||
$table->unsignedInteger('verify_code')->nullable();
|
||||
$table->boolean('verified')->default(false);
|
||||
$table->boolean('gender')->default(true);
|
||||
$table->timestamp('birth_day')->nullable();
|
||||
$table->string('postal_address')->nullable();
|
||||
$table->unsignedBigInteger('category_id')->nullable();
|
||||
$table->boolean('notification')->default(true);
|
||||
|
||||
$table->string('language')->default('ru');
|
||||
|
||||
$table->unsignedInteger('step')->default(1);
|
||||
$table->ipAddress('ip')->default('127.0.0.1');
|
||||
$table->timestamp('deleted_at')->nullable();
|
||||
//$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
||||
32
database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
32
database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('password_resets');
|
||||
}
|
||||
}
|
||||
34
database/migrations/2019_09_19_153138_create_regions_table.php
Executable file
34
database/migrations/2019_09_19_153138_create_regions_table.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateRegionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('regions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('name');
|
||||
$table->boolean('cash')->default(false);
|
||||
// $table->
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('regions');
|
||||
}
|
||||
}
|
||||
35
database/migrations/2019_09_19_153723_create_cities_table.php
Executable file
35
database/migrations/2019_09_19_153723_create_cities_table.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCitiesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('cities', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('name');
|
||||
$table->unsignedBigInteger('region_id');
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('region_id')->references('id')->on('regions');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('cities');
|
||||
}
|
||||
}
|
||||
38
database/migrations/2019_09_20_152305_create_categories_table.php
Executable file
38
database/migrations/2019_09_20_152305_create_categories_table.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateCategoriesTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('categories', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
|
||||
$table->jsonb('name');
|
||||
$table->string('image')->nullable();
|
||||
$table->string('slug');
|
||||
|
||||
$table->unsignedBigInteger('parent_id')->nullable();
|
||||
$table->unsignedInteger('position')->default(0);
|
||||
$table->boolean('credit')->default(true);
|
||||
$table->boolean('popular')->default(false);
|
||||
$table->jsonb('title_seo')->default('{"ru":"","uz":""}');
|
||||
$table->jsonb('descriptions')->default('{"ru":"","uz":""}');
|
||||
$table->jsonb('keywords')->default('{"ru":"","uz":""}');
|
||||
$table->boolean('published')->default(true);
|
||||
$table->timestamps();
|
||||
$table->foreign('parent_id')
|
||||
->references('id')
|
||||
->on('categories')
|
||||
->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('categories');
|
||||
}
|
||||
}
|
||||
31
database/migrations/2019_09_20_152645_create_addresses_table.php
Executable file
31
database/migrations/2019_09_20_152645_create_addresses_table.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateAddressesTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('addresses', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->unsignedBigInteger('city_id');
|
||||
// $table->bigInteger('phone');
|
||||
$table->string('address')->nullable();
|
||||
$table->string('home')->nullable();
|
||||
$table->string('landmark')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('city_id')->references('id')->on('cities');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('addresses');
|
||||
}
|
||||
}
|
||||
25
database/migrations/2019_09_20_154539_create_files_table.php
Executable file
25
database/migrations/2019_09_20_154539_create_files_table.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateFilesTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('files', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name');
|
||||
$table->string('path');
|
||||
$table->string('path_thumb')->nullable();
|
||||
$table->float('size');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('files');
|
||||
}
|
||||
}
|
||||
43
database/migrations/2019_09_20_154710_create_orders_table.php
Executable file
43
database/migrations/2019_09_20_154710_create_orders_table.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateOrdersTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('orders', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->integer('user_id');
|
||||
$table->integer('branch_id')->nullable();
|
||||
|
||||
$table->string('full_name')->nullable();
|
||||
$table->bigInteger('phone')->nullable();
|
||||
$table->unsignedInteger('legal_id')->nullable();
|
||||
$table->unsignedInteger('address_id')->nullable();
|
||||
|
||||
$table->boolean('with_installation')->default(false);
|
||||
$table->enum('client_type', ['physical', 'legal'])->nullable();
|
||||
$table->enum('payment_type', ['bank', 'cash', 'click', 'payme']);
|
||||
$table->boolean('with_didox')->default(false);
|
||||
$table->enum('delivery_type', ['delivery', 'pickup'])->default('delivery');
|
||||
$table->timestamp('shipment_date')->nullable();
|
||||
$table->timestamp('accepted_at')->nullable();
|
||||
$table->jsonb('currency')->nullable();
|
||||
$table->enum('status', ['processing', 'collected', 'waiting_buyer', 'in_way', 'closed', 'cancelled', 'replacement', 'completed'])->default('processing');
|
||||
$table->enum('payment_status', ['waiting', 'cancelled', 'payed', 'cash', 'review'])->default('waiting');
|
||||
|
||||
$table->boolean('archived')->default(false);
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('orders');
|
||||
}
|
||||
}
|
||||
48
database/migrations/2019_09_20_154711_create_orders_table.php
Executable file
48
database/migrations/2019_09_20_154711_create_orders_table.php
Executable file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
// Schema::create('orders_old', function (Blueprint $table) {
|
||||
// $table->bigIncrements('id');
|
||||
// $table->integer('user_id');
|
||||
// $table->integer('address_id')->nullable();
|
||||
//
|
||||
// $table->integer('price_product')->default(0);
|
||||
// $table->integer('price_delivery')->nullable();
|
||||
// // $table->integer('price_product')->nullable();
|
||||
// $table->integer('discount')->nullable();
|
||||
// $table->boolean('archived')->default(false);
|
||||
// $table->timestamp('shipment_date')->nullable();
|
||||
// $table->enum('type', ['default', 'one_click'])->default('default');
|
||||
// $table->enum('type_delivery', ['delivery', 'pickup'])->default('delivery');
|
||||
// $table->jsonb('currency');
|
||||
// $table->unsignedBigInteger('branch_id')->nullable();
|
||||
// $table->jsonb('apelsin_data')->nullable();
|
||||
// $table->enum('status', ['processing', 'collected', 'waiting_buyer', 'in_way', 'closed', 'cancelled', 'replacement', 'completed'])->default('processing');
|
||||
//
|
||||
// $table->enum('payment_type', ['cash', 'payme', 'apelsin', 'click', 'uzcard', 'oson', 'credit', 'upay', 'paynet'])->default('cash');
|
||||
// $table->enum('payment_status', ['waiting', 'cancelled', 'payed', 'cash', 'review'])->default('waiting');
|
||||
//
|
||||
// $table->text('comment')->nullable();
|
||||
//
|
||||
// $table->timestamps();
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
// Schema::dropIfExists('orders_old');
|
||||
}
|
||||
};
|
||||
25
database/migrations/2019_09_20_155407_create_order_products_table.php
Executable file
25
database/migrations/2019_09_20_155407_create_order_products_table.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateOrderProductsTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('order_products', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->integer('order_id');
|
||||
$table->integer('product_id');
|
||||
$table->integer('count')->default(1);
|
||||
$table->decimal('price')->default(0);
|
||||
$table->integer('discount')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('order_products');
|
||||
}
|
||||
}
|
||||
24
database/migrations/2019_09_20_155516_create_brends_table.php
Executable file
24
database/migrations/2019_09_20_155516_create_brends_table.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateBrendsTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('brands', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->jsonb('name');
|
||||
$table->string('image');
|
||||
$table->string('slug')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('brands');
|
||||
}
|
||||
}
|
||||
39
database/migrations/2019_09_20_155557_create_settings_table.php
Executable file
39
database/migrations/2019_09_20_155557_create_settings_table.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateSettingsTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('settings', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->jsonb('title');
|
||||
$table->jsonb('keywords');
|
||||
$table->jsonb('description');
|
||||
$table->jsonb('phone');
|
||||
$table->string('email');
|
||||
$table->boolean('buy_one')->default(true);
|
||||
$table->jsonb('address');
|
||||
$table->jsonb('socials');
|
||||
$table->jsonb('other')->default('{"delivery":{"ru":"","uz":""},"pickup":{"ru":"","uz":""}}');
|
||||
$table->boolean('pickup')->default(true);
|
||||
$table->jsonb('permissions')->default('{"news": true, "middle_banner": true, "special_block":true,"lider_products":true,"popular_products":true,"new_products":true,"popular_categories":true,"brands":true}');
|
||||
$table->boolean('on_credit')->default(false);
|
||||
$table->boolean('delivery')->default(true);
|
||||
$table->jsonb('pickup_text')->default('{"ru":"","uz":""}');
|
||||
$table->integer('price_delivery')->default(10000);
|
||||
$table->integer('day_delivery')->default(1);
|
||||
$table->jsonb('landmark');
|
||||
$table->jsonb('links')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('settings');
|
||||
}
|
||||
}
|
||||
58
database/migrations/2019_09_20_160147_create_products_table.php
Executable file
58
database/migrations/2019_09_20_160147_create_products_table.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateProductsTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('products', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
|
||||
$table->jsonb('name')->nullable();
|
||||
$table->jsonb('body')->nullable();
|
||||
$table->jsonb('short_body')->nullable();
|
||||
|
||||
$table->float('price', 18)->default(0);
|
||||
$table->float('price_discount', 18)->nullable();
|
||||
|
||||
//$table->string('category_id')->nullable();
|
||||
$table->unsignedBigInteger('brand_id')->nullable();
|
||||
$table->integer('views')->default(0);
|
||||
$table->string('poster')->nullable();
|
||||
$table->string('poster_thumb')->nullable();
|
||||
$table->text('color_id')->nullable();
|
||||
$table->integer('count')->default(0);
|
||||
$table->boolean('available')->default(true);
|
||||
$table->jsonb('sizes')->nullable();
|
||||
$table->float('price_credit')->default(0);
|
||||
// $table->jsonb('characteristics')->nul lable();
|
||||
$table->jsonb('descriptions')->default('{"ru":"","uz":""}');
|
||||
$table->jsonb('keywords')->default('{"ru":"","uz":""}');
|
||||
$table->string('slug')->nullable();
|
||||
$table->boolean('published')->default(false);
|
||||
$table->unsignedBigInteger('child_id')->nullable();
|
||||
$table->string('currency')->default('sum');
|
||||
$table->jsonb('title_seo')->default('{"ru":"","uz":""}');
|
||||
$table->boolean('popular')->default(false);
|
||||
$table->boolean('leader_of_sales')->default(false);
|
||||
$table->boolean('is_ready_solution')->default(false);
|
||||
|
||||
$table->string('article_number')->nullable();
|
||||
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('brand_id')->references('id')->on('brands');
|
||||
$table->foreign('child_id')->references('id')->on('products');
|
||||
// $table->foreign('category_id')->references('id')->on('categories');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('products');
|
||||
}
|
||||
}
|
||||
29
database/migrations/2019_09_20_160454_create_screens_table.php
Executable file
29
database/migrations/2019_09_20_160454_create_screens_table.php
Executable file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateScreensTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('screens', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
|
||||
$table->string('name');
|
||||
$table->string('path');
|
||||
$table->string('path_thumb')->nullable();
|
||||
$table->integer('product_id');
|
||||
$table->bigInteger('size')->default(0);
|
||||
$table->string('type')->default('image/jpeg');
|
||||
|
||||
//$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('screens');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePersonalAccessTokensTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('personal_access_tokens', function (Blueprint $table) {
|
||||
$table->bigIncrements('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.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('personal_access_tokens');
|
||||
}
|
||||
}
|
||||
43
database/migrations/2020_03_04_091101_create_categories_brands_table.php
Executable file
43
database/migrations/2020_03_04_091101_create_categories_brands_table.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCategoriesBrandsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('categories_brands', function (Blueprint $table) {
|
||||
//$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('category_id');
|
||||
$table->unsignedBigInteger('brand_id');
|
||||
//$table->timestamps();
|
||||
|
||||
$table->foreign('category_id')
|
||||
->references('id')->on('categories')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('brand_id')
|
||||
->references('id')->on('brands')
|
||||
->onDelete('cascade');
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('categories_brands');
|
||||
}
|
||||
}
|
||||
42
database/migrations/2020_03_04_091531_create_products_users_table.php
Executable file
42
database/migrations/2020_03_04_091531_create_products_users_table.php
Executable file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProductsUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('products_users', function (Blueprint $table) {
|
||||
// $table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('product_id');
|
||||
$table->unsignedBigInteger('user_id');
|
||||
|
||||
// $table->timestamps();
|
||||
|
||||
$table->foreign('user_id')
|
||||
->references('id')->on('users')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('product_id')
|
||||
->references('id')->on('products')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('products_users');
|
||||
}
|
||||
}
|
||||
33
database/migrations/2020_03_06_121554_create_colors_table.php
Executable file
33
database/migrations/2020_03_06_121554_create_colors_table.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateColorsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('colors', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->jsonb('name');
|
||||
$table->string('color', 100);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('colors');
|
||||
}
|
||||
}
|
||||
39
database/migrations/2020_03_07_051524_create_branches_table.php
Executable file
39
database/migrations/2020_03_07_051524_create_branches_table.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBranchesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('branches', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('name');
|
||||
$table->jsonb('address');
|
||||
$table->jsonb('schedule');
|
||||
$table->jsonb('orientation');
|
||||
|
||||
$table->jsonb('map');
|
||||
$table->string('phone', 30);
|
||||
$table->timestamps();
|
||||
$table->timestamp('deleted_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('branches');
|
||||
}
|
||||
}
|
||||
37
database/migrations/2020_04_05_201323_create_compilation_table.php
Executable file
37
database/migrations/2020_04_05_201323_create_compilation_table.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCompilationTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('compilations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('title');
|
||||
$table->integer('position')->default(1);
|
||||
$table->unsignedBigInteger('category_id')->nullable();
|
||||
$table->boolean('published')->default(false);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('compilation');
|
||||
}
|
||||
}
|
||||
34
database/migrations/2020_04_05_201446_create_compilation_products_table.php
Executable file
34
database/migrations/2020_04_05_201446_create_compilation_products_table.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCompilationProductsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('compilation_products', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('compilation_id');
|
||||
$table->unsignedBigInteger('product_id');
|
||||
|
||||
$table->foreign('compilation_id')->references('id')->on('compilations')->onDelete('cascade');
|
||||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('compilation_products');
|
||||
}
|
||||
}
|
||||
34
database/migrations/2020_04_07_141942_create_categories_products_table.php
Executable file
34
database/migrations/2020_04_07_141942_create_categories_products_table.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCategoriesProductsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('categories_products', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('category_id');
|
||||
$table->unsignedBigInteger('product_id');
|
||||
|
||||
$table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade');
|
||||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('categories_products');
|
||||
}
|
||||
}
|
||||
34
database/migrations/2020_04_30_041239_create_currencies_table.php
Executable file
34
database/migrations/2020_04_30_041239_create_currencies_table.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCurrenciesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('currencies', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedInteger('dollar');
|
||||
$table->unsignedInteger('euro');
|
||||
$table->unsignedInteger('sum')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('currencies');
|
||||
}
|
||||
}
|
||||
34
database/migrations/2020_06_15_232007_create_notifications_table.php
Executable file
34
database/migrations/2020_06_15_232007_create_notifications_table.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateNotificationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('notifications', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title');
|
||||
$table->text('body');
|
||||
$table->enum('language', ['ru', 'uz'])->default('ru');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('notifications');
|
||||
}
|
||||
}
|
||||
37
database/migrations/2020_06_15_232416_create_firebases_table.php
Executable file
37
database/migrations/2020_06_15_232416_create_firebases_table.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFirebasesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('firebases', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('user_id')->nullable();
|
||||
$table->string('token');
|
||||
$table->string('device_id');
|
||||
$table->string('device_name');
|
||||
$table->string('device_type');
|
||||
|
||||
// $table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('firebases');
|
||||
}
|
||||
}
|
||||
33
database/migrations/2020_08_02_110901_create_roles_table.php
Executable file
33
database/migrations/2020_08_02_110901_create_roles_table.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateRolesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('roles', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 100);
|
||||
$table->jsonb('permissions');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('roles');
|
||||
}
|
||||
}
|
||||
41
database/migrations/2020_08_05_112247_create_staff_table.php
Executable file
41
database/migrations/2020_08_05_112247_create_staff_table.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateStaffTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('staff', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
// $table->string('name',144);
|
||||
$table->string('username', 144)->unique();
|
||||
$table->string('password');
|
||||
$table->unsignedBigInteger('role_id')->default(1);
|
||||
$table->rememberToken();
|
||||
$table->boolean('block')->default(false);
|
||||
$table->timestamps();
|
||||
$table->foreign('role_id')
|
||||
->references('id')
|
||||
->on('roles')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('staff');
|
||||
}
|
||||
}
|
||||
37
database/migrations/2020_08_10_110038_create_partners_table.php
Executable file
37
database/migrations/2020_08_10_110038_create_partners_table.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePartnersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('partners', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('name', 100);
|
||||
$table->jsonb('description')->nullable();
|
||||
$table->string('video_url')->nullable();
|
||||
$table->string('image');
|
||||
$table->enum('status', ['published', 'new', 'soon'])->default('published');
|
||||
$table->string('is_price')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('partners');
|
||||
}
|
||||
}
|
||||
41
database/migrations/2020_08_11_121829_create_posts_table.php
Executable file
41
database/migrations/2020_08_11_121829_create_posts_table.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePostsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('posts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('slug');
|
||||
$table->string('language', 10)->default('ru');
|
||||
$table->text('content');
|
||||
$table->boolean('topped')->default(false);
|
||||
$table->string('image');
|
||||
$table->enum('type', ['news', 'article', 'sales', 'media']);
|
||||
$table->text('keywords')->nullable();
|
||||
$table->text('descriptions')->nullable();
|
||||
$table->unsignedInteger('views')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('posts');
|
||||
}
|
||||
}
|
||||
40
database/migrations/2020_08_11_210028_create_sliders_table.php
Executable file
40
database/migrations/2020_08_11_210028_create_sliders_table.php
Executable file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSlidersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sliders', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('image');
|
||||
$table->string('language', 10)->default('ru');
|
||||
$table->string('link');
|
||||
$table->unsignedInteger('position')->default(0);
|
||||
$table->boolean('published')->default(true);
|
||||
$table->enum('type', ['desktop', 'mobile'])->default('desktop');
|
||||
$table->enum('placement', ['top', 'middle'])->default('top');
|
||||
$table->unsignedInteger('views')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('sliders');
|
||||
}
|
||||
}
|
||||
35
database/migrations/2020_08_13_221808_create_special_offers_table.php
Executable file
35
database/migrations/2020_08_13_221808_create_special_offers_table.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSpecialOffersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('special_offers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('name');
|
||||
$table->jsonb('description');
|
||||
$table->string('link');
|
||||
$table->string('image');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('special_offers');
|
||||
}
|
||||
}
|
||||
43
database/migrations/2020_08_17_162907_create_comments_table.php
Executable file
43
database/migrations/2020_08_17_162907_create_comments_table.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCommentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('comments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->string('first_name');
|
||||
$table->unsignedBigInteger('user_id')->nullable();
|
||||
$table->unsignedBigInteger('product_id');
|
||||
$table->text('body')->nullable();
|
||||
$table->boolean('publish')->default(false);
|
||||
$table->unsignedInteger('star')->default(0);
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('comments');
|
||||
}
|
||||
}
|
||||
35
database/migrations/2020_08_19_051618_create_feedback_table.php
Executable file
35
database/migrations/2020_08_19_051618_create_feedback_table.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFeedbackTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('feedback', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 100);
|
||||
$table->string('phone', 30);
|
||||
$table->text('message');
|
||||
$table->boolean('viewed')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('feedback');
|
||||
}
|
||||
}
|
||||
37
database/migrations/2020_08_19_051633_create_pages_table.php
Executable file
37
database/migrations/2020_08_19_051633_create_pages_table.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePagesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pages', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('name');
|
||||
$table->string('slug');
|
||||
$table->jsonb('body');
|
||||
$table->jsonb('descriptions')->default('{"ru":"","uz":""}');
|
||||
$table->jsonb('keywords')->default('{"ru":"","uz":""}');
|
||||
$table->unsignedInteger('type')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pages');
|
||||
}
|
||||
}
|
||||
38
database/migrations/2020_08_19_155058_create_carts_table.php
Executable file
38
database/migrations/2020_08_19_155058_create_carts_table.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCartsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('carts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->string('token')->nullable();
|
||||
$table->unsignedBigInteger('user_id')->nullable();
|
||||
$table->unsignedBigInteger('product_id');
|
||||
$table->integer('count')->default(1);
|
||||
$table->string('size')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('carts');
|
||||
}
|
||||
}
|
||||
40
database/migrations/2020_08_22_130059_create_billings_table.php
Executable file
40
database/migrations/2020_08_22_130059_create_billings_table.php
Executable file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBillingsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('billings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('order_id');
|
||||
$table->enum('status', ['payed', 'waiting', 'refused'])->default('waiting');
|
||||
$table->integer('amount')->default(0);
|
||||
$table->string('payment_system')->nullable();
|
||||
$table->string('transaction_id')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('order_id')->references('id')->on('orders');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('billings');
|
||||
}
|
||||
}
|
||||
41
database/migrations/2020_08_24_122524_create_characteristics_table.php
Executable file
41
database/migrations/2020_08_24_122524_create_characteristics_table.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCharacteristicsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('characteristics', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('category_id');
|
||||
$table->jsonb('name');
|
||||
$table->enum('type', ['text', 'number', 'radio', 'checkbox', 'select']);
|
||||
$table->jsonb('options')->nullable();
|
||||
$table->boolean('filter')->default(false);
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('category_id')->references('id')->on('categories');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('characteristics');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCharacteristicsProductsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('characteristics_products', function (Blueprint $table) {
|
||||
// $table->id();
|
||||
$table->unsignedBigInteger('product_id');
|
||||
$table->unsignedBigInteger('characteristic_id');
|
||||
$table->string('value');
|
||||
|
||||
|
||||
$table->foreign('product_id')->references('id')->on('products');
|
||||
$table->foreign('characteristic_id')->references('id')->on('characteristics');
|
||||
// $table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('characteristics_products');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCharacteristicsCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('characteristics_categories', function (Blueprint $table) {
|
||||
// $table->id();
|
||||
|
||||
$table->unsignedBigInteger('characteristic_id');
|
||||
$table->unsignedBigInteger('category_id');
|
||||
|
||||
$table->foreign('category_id')->references('id')->on('categories');
|
||||
$table->foreign('characteristic_id')->references('id')->on('characteristics');
|
||||
|
||||
// $table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('characteristics_categories');
|
||||
}
|
||||
}
|
||||
45
database/migrations/2020_09_04_155225_create_previews_table.php
Executable file
45
database/migrations/2020_09_04_155225_create_previews_table.php
Executable file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePreviewsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('previews', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
|
||||
$table->jsonb('name')->nullable();
|
||||
$table->float('price', 18)->default(0);
|
||||
$table->float('price_discount', 18)->nullable();
|
||||
|
||||
$table->string('brand')->nullable();
|
||||
$table->integer('category_id');
|
||||
|
||||
$table->jsonb('characteristics')->nullable();
|
||||
|
||||
$table->boolean('popular')->default(false);
|
||||
$table->boolean('leader_of_sales')->default(false);
|
||||
$table->string('article_number')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('previews');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateNotificationAvailablesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('notification_availables', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('phone');
|
||||
$table->unsignedBigInteger('product_id');
|
||||
$table->timestamps();
|
||||
$table->integer('sms')->default(2);
|
||||
$table->foreign('product_id')
|
||||
->references('id')->on('products')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('notification_availables');
|
||||
}
|
||||
}
|
||||
35
database/migrations/2020_09_25_230821_create_activity_log_table.php
Executable file
35
database/migrations/2020_09_25_230821_create_activity_log_table.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateActivityLogTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::connection(config('activitylog.database_connection'))->create(config('activitylog.table_name'), function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('log_name')->nullable();
|
||||
$table->text('description');
|
||||
$table->nullableMorphs('subject', 'subject');
|
||||
$table->string('event')->nullable();
|
||||
$table->nullableMorphs('causer', 'causer');
|
||||
$table->json('properties')->nullable();
|
||||
$table->uuid('batch_uuid')->nullable();
|
||||
$table->timestamps();
|
||||
$table->index('log_name');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::connection(config('activitylog.database_connection'))->dropIfExists(config('activitylog.table_name'));
|
||||
}
|
||||
}
|
||||
35
database/migrations/2020_09_30_184356_create_orders_comments_table.php
Executable file
35
database/migrations/2020_09_30_184356_create_orders_comments_table.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOrdersCommentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('orders_comments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('order_id');
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->text('comment');
|
||||
$table->string('type');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('orders_comments');
|
||||
}
|
||||
}
|
||||
33
database/migrations/2020_12_04_105433_create_comments_bank_table.php
Executable file
33
database/migrations/2020_12_04_105433_create_comments_bank_table.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCommentsBankTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('comments_bank', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedInteger('order_id');
|
||||
$table->text('comment');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('comments_bank');
|
||||
}
|
||||
}
|
||||
35
database/migrations/2024_09_11_132326_create_cache_table.php
Executable file
35
database/migrations/2024_09_11_132326_create_cache_table.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('cache', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->mediumText('value');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
|
||||
Schema::create('cache_locks', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->string('owner');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('cache');
|
||||
Schema::dropIfExists('cache_locks');
|
||||
}
|
||||
};
|
||||
29
database/migrations/2024_09_16_091144_create_useful_infos_table.php
Executable file
29
database/migrations/2024_09_16_091144_create_useful_infos_table.php
Executable file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('useful_infos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('image')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('useful_infos');
|
||||
}
|
||||
};
|
||||
33
database/migrations/2024_09_16_091149_create_useful_info_items_table.php
Executable file
33
database/migrations/2024_09_16_091149_create_useful_info_items_table.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('useful_info_items', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('useful_info_id');
|
||||
$table->string('name');
|
||||
$table->text('description')->nullable();
|
||||
$table->string('video_url')->nullable();
|
||||
$table->string('link_url')->nullable();
|
||||
$table->string('file_url')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('useful_info_items');
|
||||
}
|
||||
};
|
||||
33
database/migrations/2024_09_16_102630_create_partner_requests_table.php
Executable file
33
database/migrations/2024_09_16_102630_create_partner_requests_table.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('partner_requests', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('partner_id');
|
||||
$table->bigInteger('city_id');
|
||||
$table->decimal('price')->nullable();
|
||||
$table->string('comment')->nullable();
|
||||
$table->bigInteger('phone');
|
||||
$table->string('full_name');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('partner_requests');
|
||||
}
|
||||
};
|
||||
32
database/migrations/2024_09_16_104012_create_services_table.php
Executable file
32
database/migrations/2024_09_16_104012_create_services_table.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('services', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('name');
|
||||
$table->string('image');
|
||||
$table->enum('status', ['new', 'soon', 'published'])->default('published');
|
||||
$table->string('type');
|
||||
$table->boolean('is_power')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('services');
|
||||
}
|
||||
};
|
||||
29
database/migrations/2024_09_16_105148_create_powers_table.php
Executable file
29
database/migrations/2024_09_16_105148_create_powers_table.php
Executable file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('powers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('name');
|
||||
$table->integer('power');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('powers');
|
||||
}
|
||||
};
|
||||
34
database/migrations/2024_09_16_111211_create_service_requests_table.php
Executable file
34
database/migrations/2024_09_16_111211_create_service_requests_table.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('service_requests', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('service_id')->unsigned();
|
||||
$table->bigInteger('power_id')->unsigned()->nullable();
|
||||
$table->bigInteger('city_id')->unsigned();
|
||||
$table->string('comment')->nullable();
|
||||
$table->bigInteger('phone');
|
||||
$table->string('full_name');
|
||||
// $table->unsignedInteger('user_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('service_requests');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('user_legal_infos', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('user_id');
|
||||
$table->string('company_name');
|
||||
$table->string('inn');
|
||||
$table->string('bank_name');
|
||||
$table->string('mfo');
|
||||
$table->string('oked');
|
||||
$table->string('payment_account');
|
||||
$table->string('address');
|
||||
$table->string('email');
|
||||
$table->string('phone');
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('user_legal_infos');
|
||||
}
|
||||
};
|
||||
34
database/migrations/2024_09_19_072640_add_token_to_favorites_table.php
Executable file
34
database/migrations/2024_09_19_072640_add_token_to_favorites_table.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('products_users', function (Blueprint $table) {
|
||||
$table->string('token')->nullable();
|
||||
$table->unsignedBigInteger('user_id')->nullable()->change();
|
||||
|
||||
$table->index('token');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('products_users', function (Blueprint $table) {
|
||||
$table->dropColumn('token');
|
||||
$table->unsignedBigInteger('user_id')->nullable(false)->change();
|
||||
|
||||
$table->dropIndex('token');
|
||||
});
|
||||
}
|
||||
};
|
||||
28
database/migrations/2024_09_19_151939_add_position_to_services_table.php
Executable file
28
database/migrations/2024_09_19_151939_add_position_to_services_table.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('services', function (Blueprint $table) {
|
||||
$table->integer('position')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('services', function (Blueprint $table) {
|
||||
$table->dropColumn('position');
|
||||
});
|
||||
}
|
||||
};
|
||||
30
database/migrations/2024_09_20_043941_remove_product_columns.php
Executable file
30
database/migrations/2024_09_20_043941_remove_product_columns.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->string("data_sheet")->nullable();
|
||||
$table->dropColumn('price_credit');
|
||||
$table->dropColumn('popular');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
// Truncate the 'useful_infos' table to remove all rows
|
||||
DB::table('useful_infos')->truncate();
|
||||
|
||||
Schema::table('useful_infos', function (Blueprint $table) {
|
||||
$table->dropColumn('name');
|
||||
$table->json('name');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('useful_infos', function (Blueprint $table) {
|
||||
$table->dropColumn('name');
|
||||
$table->string('name');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
// Truncate the 'useful_info_items' table to remove all rows
|
||||
DB::table('useful_info_items')->truncate();
|
||||
|
||||
Schema::table('useful_info_items', function (Blueprint $table) {
|
||||
$table->dropColumn('name');
|
||||
$table->json('name');
|
||||
|
||||
$table->dropColumn('description');
|
||||
$table->json('description');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('useful_info_items', function (Blueprint $table) {
|
||||
$table->dropColumn('name');
|
||||
$table->string('name');
|
||||
|
||||
$table->dropColumn('description');
|
||||
$table->string('description');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('useful_info_items', function (Blueprint $table) {
|
||||
$table->text('description')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('useful_info_items', function (Blueprint $table) {
|
||||
$table->text('description')->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
31
database/migrations/2024_09_21_172016_add_service_requests_user_id.php
Executable file
31
database/migrations/2024_09_21_172016_add_service_requests_user_id.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('service_requests', function (Blueprint $table) {
|
||||
$table->unsignedInteger('user_id');
|
||||
$table->string('status')->default('pending'); // pending, accepted, closed
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('service_requests', function (Blueprint $table) {
|
||||
$table->dropColumn('user_id');
|
||||
$table->dropColumn('deleted_at');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('partner_requests', function (Blueprint $table) {
|
||||
$table->string('status')->default('pending'); // pending, accepted, closed
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('partner_requests', function (Blueprint $table) {
|
||||
$table->dropColumn('status');
|
||||
});
|
||||
}
|
||||
};
|
||||
34
database/migrations/2024_09_23_055830_add_columns_to_orders.php
Executable file
34
database/migrations/2024_09_23_055830_add_columns_to_orders.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
$table->bigInteger('price_products')->default(0);
|
||||
$table->bigInteger('price_delivery')->default(0);
|
||||
// $table->bigInteger('price_discount')->default(0);
|
||||
$table->bigInteger('price_total')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
$table->dropColumn('price_products');
|
||||
$table->dropColumn('price_delivery');
|
||||
// $table->dropColumn('price_discount');
|
||||
$table->dropColumn('price_total');
|
||||
});
|
||||
}
|
||||
};
|
||||
28
database/migrations/2024_09_23_071008_add_columns_to_products.php
Executable file
28
database/migrations/2024_09_23_071008_add_columns_to_products.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->integer('power')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->dropColumn('power');
|
||||
});
|
||||
}
|
||||
};
|
||||
33
database/migrations/2024_09_23_073917_create_delivery_prices_table.php
Executable file
33
database/migrations/2024_09_23_073917_create_delivery_prices_table.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('delivery_prices', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedInteger('power_id');
|
||||
$table->unsignedInteger('region_id')->nullable();
|
||||
$table->bigInteger('price')->default(0);
|
||||
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('delivery_prices');
|
||||
}
|
||||
};
|
||||
28
database/migrations/2024_09_23_080431_add_to_master_price_settings.php
Executable file
28
database/migrations/2024_09_23_080431_add_to_master_price_settings.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->bigInteger('master_price')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->dropColumn('master_price');
|
||||
});
|
||||
}
|
||||
};
|
||||
28
database/migrations/2024_09_23_093104_create_problems_table.php
Executable file
28
database/migrations/2024_09_23_093104_create_problems_table.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('problems', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('title');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('problems');
|
||||
}
|
||||
};
|
||||
31
database/migrations/2024_09_23_094636_create_service_problems_table.php
Executable file
31
database/migrations/2024_09_23_094636_create_service_problems_table.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('service_problems', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('service_id')->unsigned();
|
||||
$table->foreign('service_id')->references('id')->on('services')->onDelete('cascade');
|
||||
$table->bigInteger('problem_id')->unsigned();
|
||||
$table->foreign('problem_id')->references('id')->on('problems')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('service_problems');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('services', function (Blueprint $table) {
|
||||
$table->boolean('with_problem')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('services', function (Blueprint $table) {
|
||||
$table->dropColumn('with_problem');
|
||||
});
|
||||
}
|
||||
};
|
||||
28
database/migrations/2024_09_23_112419_add_columns_to_orders.php
Executable file
28
database/migrations/2024_09_23_112419_add_columns_to_orders.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
$table->bigInteger('price_master')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
$table->dropColumn('price_master');
|
||||
});
|
||||
}
|
||||
};
|
||||
28
database/migrations/2024_09_23_121904_create_measurements_table.php
Executable file
28
database/migrations/2024_09_23_121904_create_measurements_table.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('measurements', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('name');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('measurements');
|
||||
}
|
||||
};
|
||||
30
database/migrations/2024_09_23_131857_create_contract_templates_table.php
Executable file
30
database/migrations/2024_09_23_131857_create_contract_templates_table.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('contract_templates', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('path');
|
||||
$table->enum('lang', ['uz', 'ru'])->default('uz');
|
||||
$table->enum('type', ['physical', 'legal'])->default('physical');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('contract_templates');
|
||||
}
|
||||
};
|
||||
30
database/migrations/2024_09_24_105351_create_order_contracts_table.php
Executable file
30
database/migrations/2024_09_24_105351_create_order_contracts_table.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('order_contracts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('order_id');
|
||||
$table->enum('type', ['contract', 'master_contract']);
|
||||
$table->string('path');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('order_contracts');
|
||||
}
|
||||
};
|
||||
28
database/migrations/2024_09_25_053615_add_position_to_useful_infos_table.php
Executable file
28
database/migrations/2024_09_25_053615_add_position_to_useful_infos_table.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('useful_infos', function (Blueprint $table) {
|
||||
$table->unsignedInteger('position')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('useful_infos', function (Blueprint $table) {
|
||||
$table->dropColumn('position');
|
||||
});
|
||||
}
|
||||
};
|
||||
28
database/migrations/2024_09_25_054828_add_position_to_posts_table.php
Executable file
28
database/migrations/2024_09_25_054828_add_position_to_posts_table.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('posts', function (Blueprint $table) {
|
||||
$table->unsignedInteger('position')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('posts', function (Blueprint $table) {
|
||||
$table->dropColumn('position');
|
||||
});
|
||||
}
|
||||
};
|
||||
28
database/migrations/2024_09_26_112140_add_middle_name_to_users_table.php
Executable file
28
database/migrations/2024_09_26_112140_add_middle_name_to_users_table.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->string('middle_name')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('middle_name');
|
||||
});
|
||||
}
|
||||
};
|
||||
29
database/migrations/2024_09_26_112539_create_payment_system_models_table.php
Executable file
29
database/migrations/2024_09_26_112539_create_payment_system_models_table.php
Executable file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('payment_system_models', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('title');
|
||||
$table->string('slug')->unique();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('payment_system_models');
|
||||
}
|
||||
};
|
||||
31
database/migrations/2024_09_26_112637_create_payment_system_items_table.php
Executable file
31
database/migrations/2024_09_26_112637_create_payment_system_items_table.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('payment_system_items', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('payment_system_id');
|
||||
$table->jsonb('title');
|
||||
$table->string('logo');
|
||||
$table->string('slug')->unique();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('payment_system_items');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('payment_system_items', function (Blueprint $table) {
|
||||
$table->json('description')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('payment_system_items', function (Blueprint $table) {
|
||||
$table->dropColumn('description');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('service_requests', function (Blueprint $table) {
|
||||
$table->integer('problem_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('service_requests', function (Blueprint $table) {
|
||||
$table->dropColumn('problem_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
28
database/migrations/2024_09_26_143658_add_measurement_id_products.php
Executable file
28
database/migrations/2024_09_26_143658_add_measurement_id_products.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->unsignedInteger('measurement_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->dropColumn('measurement_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
34
database/migrations/2024_09_27_065730_create_companies_table.php
Executable file
34
database/migrations/2024_09_27_065730_create_companies_table.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('companies', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('company_name');
|
||||
$table->string('inn');
|
||||
$table->string('bank_name');
|
||||
$table->string('mfo');
|
||||
$table->string('oked');
|
||||
$table->jsonb('address');
|
||||
$table->string('director_full_name');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('companies');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('user_legal_infos', function (Blueprint $table) {
|
||||
$table->string('director_full_name')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('user_legal_infos', function (Blueprint $table) {
|
||||
$table->dropColumn('director_full_name');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropUnique(['phone']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->unique('phone');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('addresses', function (Blueprint $table) {
|
||||
$table->dropForeign(['city_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('addresses', function (Blueprint $table) {
|
||||
$table->foreignId('city_id')->constrained();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('cities', function (Blueprint $table) {
|
||||
$table->dropForeign(['region_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('cities', function (Blueprint $table) {
|
||||
$table->foreignId('region_id')->constrained();
|
||||
});
|
||||
}
|
||||
};
|
||||
30
database/migrations/2024_09_30_095827_create_statuses_table.php
Executable file
30
database/migrations/2024_09_30_095827_create_statuses_table.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('statuses', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('slug')->unique();
|
||||
$table->string('font_color');
|
||||
$table->string('bg_color');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('statuses');
|
||||
}
|
||||
};
|
||||
30
database/migrations/2024_09_30_184915_add_columns_to_companies_table.php
Executable file
30
database/migrations/2024_09_30_184915_add_columns_to_companies_table.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('companies', function (Blueprint $table) {
|
||||
$table->string('payment_account')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('companies', function (Blueprint $table) {
|
||||
$table->dropColumn('payment_account');
|
||||
$table->dropColumn('phone');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('partner_requests', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('user_id')->nullable();
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('partner_requests', function (Blueprint $table) {
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->dropColumn('user_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
28
database/migrations/2024_10_21_112036_add_group_id_to_settings_table.php
Executable file
28
database/migrations/2024_10_21_112036_add_group_id_to_settings_table.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->string('group_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->dropColumn('group_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('categories', function (Blueprint $table) {
|
||||
$table->boolean('is_filter_power')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('categories', function (Blueprint $table) {
|
||||
$table->dropColumn('is_filter_power');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table("categories", function (Blueprint $table) {
|
||||
$table->jsonb("company_name")->nullable();
|
||||
$table->jsonb("director_full_namev")->nullable();
|
||||
$table->jsonb("bank_name")->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table("orders", function (Blueprint $table) {
|
||||
$table->string("jshir", 255)->nullable();
|
||||
$table->string("series", 255)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table("orders", function (Blueprint $table) {
|
||||
$table->dropColumn("jshir");
|
||||
$table->dropColumn("series");
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table("partners", function (Blueprint $table) {
|
||||
$table->integer("position")->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table("partners", function (Blueprint $table) {
|
||||
$table->dropColumn("position"); // drop the column
|
||||
});
|
||||
}
|
||||
};
|
||||
28
database/migrations/2024_11_06_132851_brand_table_update.php
Normal file
28
database/migrations/2024_11_06_132851_brand_table_update.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table("brands", function (Blueprint $table) {
|
||||
$table->integer("position")->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table("brands", function (Blueprint $table) {
|
||||
$table->dropColumn("position");
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table("products", function (Blueprint $table) {
|
||||
$table->string("calc")->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table("products", function (Blueprint $table) {
|
||||
$table->dropColumn("calc");
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table("categories", function (Blueprint $table) {
|
||||
$table->enum("company", [
|
||||
"getgreen",
|
||||
"sunhightech"
|
||||
])->default("getgreen");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table("categories", function (Blueprint $table) {
|
||||
$table->dropColumn("company");
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table("contract_templates", function(Blueprint $table){
|
||||
$table->enum("company",[
|
||||
"getgreen",
|
||||
"sunhightech"
|
||||
])->default("getgreen");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table("contract_templates", function(Blueprint $table){
|
||||
$table->dropColumn("company");
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class UpdateOrdersTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
$table->string('payment_status')->default('waiting')->notNullable()->change();
|
||||
});
|
||||
|
||||
DB::statement("
|
||||
ALTER TABLE orders
|
||||
ADD CONSTRAINT payment_status_check
|
||||
CHECK (payment_status IN ('waiting', 'cancelled', 'payed', 'cash', 'review', 'processing'))
|
||||
");
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
DB::statement("
|
||||
ALTER TABLE orders
|
||||
DROP CONSTRAINT IF EXISTS payment_status_check
|
||||
");
|
||||
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
$table->string('payment_status')->nullable()->default(null)->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
69
database/seeders/BrandSeeder.php
Executable file
69
database/seeders/BrandSeeder.php
Executable file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Brand;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class BrandSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
Brand::create([
|
||||
'name' => [
|
||||
'uz' => 'Apple',
|
||||
'ru' => 'Яблоко',
|
||||
],
|
||||
"position"=>1,
|
||||
'image' => 'apple.png',
|
||||
]);
|
||||
|
||||
Brand::create([
|
||||
'name' => [
|
||||
'uz' => 'Samsung',
|
||||
'ru' => 'Самсунг',
|
||||
],
|
||||
"position"=>2,
|
||||
'image' => 'samsung.png',
|
||||
]);
|
||||
|
||||
Brand::create([
|
||||
'name' => [
|
||||
'uz' => 'Xiaomi',
|
||||
'ru' => 'Шаоми',
|
||||
],
|
||||
"position"=>3,
|
||||
'image' => 'xiaomi.png',
|
||||
]);
|
||||
|
||||
Brand::create([
|
||||
'name' => [
|
||||
'uz' => 'Huawei',
|
||||
'ru' => 'Хуавей',
|
||||
],
|
||||
"position"=>4,
|
||||
'image' => 'huawei.png',
|
||||
]);
|
||||
|
||||
Brand::create([
|
||||
'name' => [
|
||||
'uz' => 'Nokia',
|
||||
'ru' => 'Нокиа',
|
||||
],
|
||||
"position"=>5,
|
||||
'image' => 'nokia.png',
|
||||
]);
|
||||
|
||||
Brand::create([
|
||||
'name' => [
|
||||
'uz' => 'Sony',
|
||||
'ru' => 'Сони',
|
||||
],
|
||||
"position"=>6,
|
||||
'image' => 'sony.png',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user