Updated Seeders

This commit is contained in:
frederikpyt
2020-07-30 12:28:05 +02:00
parent cf4559874a
commit be575a9515
3 changed files with 23 additions and 12 deletions
+3 -6
View File
@@ -19,7 +19,7 @@ class UserSeeder extends Seeder
// } catch (Exception $e) {
// }
/*if(User::where("name_first", "admin"))
@@ -41,11 +41,8 @@ class UserSeeder extends Seeder
$user->setPasswordAttribute("1234");
$user->phone = 12345678;
//gives all permission to the Admin.
foreach (\Spatie\Permission\Models\Permission::all() as $permission) {
$user->givePermissionTo($permission);
}
//Gives Administrator role to the Admin
$user->assignRole("Administrator");
$user->save();
}