First Commit
This commit is contained in:
Executable
+38
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class UserSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application users.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// SuperAdmin
|
||||
User::firstOrCreate(
|
||||
['email' => 'superadmin@sistema.com'],
|
||||
[
|
||||
'name' => 'Super Admin',
|
||||
'password' => Hash::make('superadmin123'),
|
||||
'role' => 'superadmin',
|
||||
'is_approved' => true,
|
||||
]
|
||||
);
|
||||
|
||||
// Regular User
|
||||
User::firstOrCreate(
|
||||
['email' => 'user@sistema.com'],
|
||||
[
|
||||
'name' => 'User Test',
|
||||
'password' => Hash::make('user123'),
|
||||
'role' => 'user',
|
||||
'is_approved' => true,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user