Init(Core): add to repo and add seeders

This commit is contained in:
2026-04-28 22:48:42 +03:30
commit be6b699ff0
205 changed files with 22524 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
// Create admin user
$admin = User::factory()->admin()->create();
// Create test user
$test = User::factory()->test()->create();
// Create 10 random users
User::factory(10)->create();
// Create personal access tokens for admin
$admin->createToken('admin-token', ['*'])->plainTextToken;
// Create personal access token for test user
$test->createToken('test-token', ['*'])->plainTextToken;
$this->command->info('Database seeded successfully!');
$this->command->info('Admin: admin@example.com / password');
$this->command->info('Test: test@example.com / password');
}
}