Файловый менеджер - Редактировать - /var/www/vhosts/aviointeriors.dev1.mndrn.cloud/bootstrap/update/database.tar
Назад
factories/UserFactory.php 0000644 00000001276 15233700432 0011507 0 ustar 00 <?php namespace Database\Factories; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Facades\Hash; class UserFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = User::class; /** * Define the model's default state. * * @return array */ public function definition() { return [ 'first_name' => $this->faker->firstName, 'last_name' => $this->faker->lastName, 'password' => Hash::make($this->faker->password), 'email' => $this->faker->unique()->safeEmail, ]; } } factories/CompanyFactory.php 0000644 00000000770 15233700432 0012175 0 ustar 00 <?php namespace Database\Factories; use App\Models\Company; use Illuminate\Database\Eloquent\Factories\Factory; class CompanyFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Company::class; /** * Define the model's default state. * * @return array */ public function definition() { return [ 'name' => $this->faker->unique()->company ]; } } seeders/CompanyTableSeeder.php 0000644 00000000764 15233700432 0012423 0 ustar 00 <?php namespace Database\Seeders; use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; use App\Models\Company; use App\Models\User; class CompanyTableSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { $company = Company::factory()->has(User::factory()->count(3), 'users')->count(3)->create(); } } seeders/UserTableSeeder.php 0000644 00000001321 15233700432 0011721 0 ustar 00 <?php namespace Database\Seeders; use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; use App\Models\User; use App\Models\Company; class UserTableSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { DB::table('users')->insert([ 'id' => 9, 'first_name' => 'Stefan', 'last_name' => 'Pantu', 'email' => 's.pantu@mandarinoadv.com', 'password' => Hash::make('mandarino2024') ]); User::factory()->count(2)->for(Company::factory())->create(); } } seeders/AdminTableSeeder.php 0000644 00000001020 15233700432 0012027 0 ustar 00 <?php namespace Database\Seeders; use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; class AdminTableSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { // DB::table('admin')->insert([ 'name' => 'admin', 'email' => 's.pantu@mandarinoadv.com', 'password' => Hash::make('rinomanda2024') ]); } } seeders/DatabaseSeeder.php 0000644 00000000503 15233700432 0011540 0 ustar 00 <?php namespace Database\Seeders; use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { // $this->call('UsersTableSeeder'); } } migrations/2024_07_09_195444_add_missing_folder_to_companies_table.php 0000644 00000001137 15233700432 0021274 0 ustar 00 <?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->integer('missing_folders')->unsigned()->nullable()->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('companies', function (Blueprint $table) { // }); } }; migrations/2024_07_05_122532_add_active_to_companies_table.php 0000644 00000001126 15233700432 0017521 0 ustar 00 <?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->integer('active')->unsigned()->nullable()->default(0); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('companies', function (Blueprint $table) { // }); } }; migrations/2024_06_05_160057_create_questions_table.php 0000644 00000001263 15233700432 0016260 0 ustar 00 <?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('questions', function (Blueprint $table) { $table->id(); $table->integer('type')->unsigned()->nullable(); $table->text('label')->nullable(); $table->string('lang')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('questions'); } }; migrations/2024_06_05_153549_add_type_and_label_to_ratings_table.php 0000644 00000001104 15233700432 0020710 0 ustar 00 <?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('ratings', function (Blueprint $table) { $table->integer('type')->unsigned()->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('ratings', function (Blueprint $table) { // }); } }; migrations/2024_06_05_104514_create_ratings_table.php 0000644 00000001452 15233700432 0015671 0 ustar 00 <?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('ratings', function (Blueprint $table) { $table->id(); $table->timestamps(); $table->bigInteger('user_id')->unsigned(); $table->bigInteger('company_id')->unsigned(); $table->integer('rate')->unsigned()->nullable(); $table->text('message')->nullable(); $table->timestamp('read_at')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('ratings'); } }; migrations/2024_07_09_134709_create_mail_queue_table.php 0000644 00000001736 15233700432 0016373 0 ustar 00 <?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('mail_queue', function (Blueprint $table) { $table->id(); $table->text('label'); $table->text('type'); $table->text('status')->nullable(); $table->text('info')->nullable(); $table->json('mail_json')->nullable(); $table->string('to')->nullable(); $table->string('from')->nullable(); $table->text('cc')->nullable(); $table->text('ccn')->nullable(); $table->timestamp('send_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('mail_queue'); } }; migrations/2024_07_23_175746_add_renewal_token_to_users_table.php 0000644 00000001072 15233700432 0020305 0 ustar 00 <?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->text('renewal_token')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { // }); } }; migrations/2024_06_07_113312_add_user_first_name_and_user_last_name_to_products_table.php 0000644 00000001172 15233700432 0025221 0 ustar 00 <?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->text('user_first_name')->nullable(); $table->text('user_last_name')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('products', function (Blueprint $table) { // }); } }; migrations/2024_02_23_171800_add_folder_id_to_companies.php 0000644 00000001215 15233700432 0017022 0 ustar 00 <?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->bigInteger('folder_id')->unsigned()->nullable(); // $table->foreign('folder_id')->references('id')->on('folders')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { // Schema::dropIfExists('companies'); } }; migrations/2024_06_17_140954_create_password_reset_tokens_table.php 0000644 00000001165 15233700432 0020665 0 ustar 00 <?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('password_resets', function (Blueprint $table) { $table->string('email')->primary(); $table->string('token'); $table->timestamp('created_at')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('password_resets'); } }; migrations/2024_06_06_221616_add_user_id_and_active_to_products_table.php 0000644 00000001224 15233700432 0021744 0 ustar 00 <?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('user_id')->unsigned()->nullable(); $table->integer('active')->default(0)->unsigned()->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('products', function (Blueprint $table) { // }); } }; migrations/2024_02_01_174242_create_folders_table.php 0000644 00000001171 15233700432 0015653 0 ustar 00 <?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('folders', function (Blueprint $table) { $table->id(); $table->string('path'); $table->integer('parent_id')->unsigned()->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('folders'); } }; migrations/2024_02_20_221056_create_admin_notifications_table.php 0000644 00000001620 15233700432 0020232 0 ustar 00 <?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('admin_notifications', function (Blueprint $table) { $table->id(); $table->bigInteger('instigator_id')->unsigned()->nullable(); // $table->foreign('instigator_id')->references('id')->on('users'); $table->text('message')->nullable(); $table->string('cta_label')->nullable(); $table->string('href')->nullable(); $table->timestamp('read_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('admin_notifications'); } }; migrations/2024_07_12_153253_add_expired_and_renew_date_to_users_table.php 0000644 00000001225 15233700432 0022112 0 ustar 00 <?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->integer('expired')->unsigned()->nullable()->default(0); $table->timestamp('renew_date')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { // }); } }; migrations/2024_02_18_141350_create_users_table.php 0000644 00000001611 15233700432 0015357 0 ustar 00 <?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('users', function (Blueprint $table) { $table->id(); $table->string('first_name'); $table->string('last_name'); $table->string('email')->unique(); $table->string('password'); $table->bigInteger('company_id')->unsigned()->nullable(); // $table->foreign('company_id')->unsigned()->nullable()->references('id')->on('companies')->onDelete('set null'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { // Schema::dropIfExists('users'); } }; migrations/2024_02_23_171727_add_company_id_to_folders.php 0000644 00000001202 15233700432 0016701 0 ustar 00 <?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('folders', function (Blueprint $table) { $table->bigInteger('company_id')->unsigned()->nullable(); // $table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('folders'); } }; migrations/2024_06_05_103004_add_label_to_folder_table.php 0000644 00000001062 15233700432 0016611 0 ustar 00 <?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('folders', function (Blueprint $table) { $table->string('label')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('folders', function (Blueprint $table) { }); } }; migrations/.gitkeep 0000644 00000000000 15233700432 0010336 0 ustar 00 migrations/2024_02_01_140201_create_documents_table.php 0000644 00000001176 15233700432 0016207 0 ustar 00 <?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('documents', function (Blueprint $table) { $table->id(); $table->string('path'); $table->integer('product_id')->unsigned()->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('documents'); } }; migrations/2024_02_20_221056_create_user_notifications_table.php 0000644 00000001473 15233700432 0020126 0 ustar 00 <?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_notifications', function (Blueprint $table) { $table->id(); $table->bigInteger('company_id')->unsigned()->nullable(); $table->text('message')->nullable(); $table->string('cta_label')->nullable(); $table->string('href')->nullable(); $table->timestamp('read_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('user_notifications'); } }; migrations/2024_06_05_103224_add_active_to_users_table.php 0000644 00000001066 15233700432 0016703 0 ustar 00 <?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->integer('active')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { // }); } }; migrations/2024_01_30_134820_create_companies_table.php 0000644 00000001120 15233700432 0016164 0 ustar 00 <?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('name')->unique(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { // Schema::dropIfExists('companies'); } }; migrations/2024_01_19_124312_create_admin_table.php 0000644 00000001212 15233700432 0015302 0 ustar 00 <?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('admin', function (Blueprint $table) { $table->id(); $table->string('name'); $table->string('email')->unique(); $table->string('password'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('admin'); } }; migrations/2024_01_31_162455_create_cabin_class_table.php 0000644 00000001350 15233700432 0016462 0 ustar 00 <?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('cabin_class', function (Blueprint $table) { $table->id(); $table->string('name'); $table->bigInteger('company_id')->nullable()->unsigned(); $table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('cabin_class'); } }; migrations/2024_07_09_140651_add_user_id_to_mail_queue_table.php 0000644 00000001115 15233700432 0020054 0 ustar 00 <?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('mail_queue', function (Blueprint $table) { $table->integer('user_id')->unsigned()->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('mail_queue', function (Blueprint $table) { // }); } }; migrations/2024_06_18_145926_add_name_to_documents_table.php 0000644 00000001073 15233700432 0017231 0 ustar 00 <?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('documents', function (Blueprint $table) { $table->string('name')->nullable(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('documents', function (Blueprint $table) { // }); } }; migrations/2024_01_31_163439_create_products_table.php 0000644 00000001420 15233700432 0016065 0 ustar 00 <?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('products', function (Blueprint $table) { $table->id(); $table->string('serial_number'); $table->bigInteger('cabin_class_id')->unsigned()->nullable(); // $table->foreign('cabin_class_id')->unsigned()->nullable()->references('id')->on('cabin_class')->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('products'); } };
| ver. 1.4 |
Github
|
.
| PHP 8.2.5 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка