adds roles

This commit is contained in:
2026-02-16 11:19:06 +01:00
parent ebaeb1722d
commit 4dc64c22cb
29 changed files with 495 additions and 89 deletions

View File

@@ -1,22 +1,28 @@
<?php
declare(strict_types=1);
namespace Database\Seeders;
use App\Models\Role;
use App\Models\User;
use Illuminate\Database\Seeder;
class JonathanSeeder extends Seeder
final class JonathanSeeder extends Seeder
{
/**
* Seed the application's database.
* Seed the application's database with admin user Jonathan.
*/
public function run(): void
{
$adminRole = Role::where('name', 'admin')->first();
User::factory()->create([
'name' => 'Jonathan',
'email' => 'jonathan@blijnder.nl',
'password' => bcrypt('secret'),
'email_verified_at' => now(),
'role_id' => $adminRole->id,
]);
}
}