Файловый менеджер - Редактировать - /home/gqdcvggs/go.imators.com/database.tar
Назад
factories/UserFactory.php 0000664 00000002063 15114742574 0011517 0 ustar 00 <?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, ]); } } seeders/DatabaseSeeder.php 0000664 00000000727 15114742574 0011565 0 ustar 00 <?php namespace Database\Seeders; // use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder { /** * Seed the application's database. */ public function run(): void { // \App\Models\User::factory(10)->create(); // \App\Models\User::factory()->create([ // 'name' => 'Test User', // 'email' => 'test@example.com', // ]); } } .gitignore 0000664 00000000012 15114742574 0006541 0 ustar 00 *.sqlite* migrations/2014_10_12_000000_create_users_table.php 0000664 00000001357 15114742574 0015355 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('name'); $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); $table->rememberToken(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('users'); } }; migrations/2019_08_19_000000_create_failed_jobs_table.php 0000664 00000001400 15114742574 0016465 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('failed_jobs', function (Blueprint $table) { $table->id(); $table->string('uuid')->unique(); $table->text('connection'); $table->text('queue'); $table->longText('payload'); $table->longText('exception'); $table->timestamp('failed_at')->useCurrent(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('failed_jobs'); } }; migrations/2014_10_12_100000_create_password_reset_tokens_table.php 0000664 00000001201 15114742574 0020630 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_reset_tokens', 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_reset_tokens'); } }; migrations/2025_05_29_130326_create_document_shares_table.php 0000664 00000001543 15114742574 0017431 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { public function up() { Schema::create('document_shares', function (Blueprint $table) { $table->id(); $table->foreignId('document_id')->constrained()->onDelete('cascade'); $table->string('share_token', 64)->unique(); $table->enum('permission', ['view', 'edit'])->default('view'); $table->boolean('is_active')->default(true); $table->timestamp('expires_at')->nullable(); $table->timestamps(); $table->index('share_token'); $table->index('is_active'); }); } public function down() { Schema::dropIfExists('document_shares'); } }; migrations/2019_12_14_000001_create_personal_access_tokens_table.php 0000664 00000001530 15114742574 0020746 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('personal_access_tokens', function (Blueprint $table) { $table->id(); $table->morphs('tokenable'); $table->string('name'); $table->string('token', 64)->unique(); $table->text('abilities')->nullable(); $table->timestamp('last_used_at')->nullable(); $table->timestamp('expires_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('personal_access_tokens'); } }; migrations/2025_05_29_130737_create_documents_table.php 0000664 00000001027 15114742574 0016252 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->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('documents'); } }; migrations/2025_05_29_130321_create_documents_table.php 0000664 00000001413 15114742574 0016236 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { public function up() { Schema::create('documents', function (Blueprint $table) { $table->id(); $table->integer('user_id'); $table->string('title'); $table->longText('content'); $table->enum('status', ['draft', 'published'])->default('draft'); $table->timestamps(); $table->timestamp('last_accessed_at')->nullable(); $table->index('user_id'); $table->index('status'); }); } public function down() { Schema::dropIfExists('documents'); } };
| ver. 1.6 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка