31 lines
644 B
PHP
31 lines
644 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Database\Seeders;
|
||
|
|
|
||
|
|
use App\Models\User;
|
||
|
|
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||
|
|
use Illuminate\Database\Seeder;
|
||
|
|
use Spatie\Permission\Models\Permission;
|
||
|
|
|
||
|
|
class DatabaseSeeder extends Seeder
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Seed the application's database.
|
||
|
|
*/
|
||
|
|
public function run(): void
|
||
|
|
{
|
||
|
|
// User::factory(10)->create();
|
||
|
|
|
||
|
|
User::factory()->create([
|
||
|
|
'name' => 'admin',
|
||
|
|
'email' => 'admin@example.com',
|
||
|
|
'password' => '12345678',
|
||
|
|
]);
|
||
|
|
|
||
|
|
$this->call([
|
||
|
|
PermissionSeeder::class,
|
||
|
|
RolePermissionSeeder::class
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|