Neuaufbau des Repositories

This commit is contained in:
2026-04-13 14:01:19 +02:00
parent 4a7638d5e9
commit 35b5f39843
14 changed files with 494 additions and 13 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
class AdminUserSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// Create an admin user if it doesn't exist
$user = User::firstOrCreate(
['email' => 'admin@bratanbonus.test'],
[
'name' => 'Admin Bratan',
'password' => Hash::make('password'),
'role' => 'admin',
]
);
$this->command->info('Admin User created successfully!');
$this->command->info('--------------------------------');
$this->command->info('Email: ' . $user->email);
$this->command->info('Password: password');
$this->command->info('Role: ' . $user->role);
$this->command->info('--------------------------------');
}
}