Added more permissions to the seeder.
This commit is contained in:
parent
f638777878
commit
c609cf78ff
|
@ -40,13 +40,22 @@ class PermissionSeeder extends Seeder
|
|||
"link.external.edit" => "Allows editing of external links.",
|
||||
"link.external.delete" => "Allows deletion of external links",
|
||||
|
||||
"event.create" => "Create a new event",
|
||||
"event.list" => "Shows all events",
|
||||
"event.show" => "Shows event",
|
||||
"event.edit" => "Edit event",
|
||||
"event.delete" => "Deletes an event",
|
||||
|
||||
"contact.create" => "Creates a new contact",
|
||||
"contact.list" => ""
|
||||
];
|
||||
|
||||
foreach ($permissions as $key => $value) {
|
||||
// if(Permission::findByName($key))
|
||||
// continue;
|
||||
|
||||
try {
|
||||
if(Permission::findByName($key))
|
||||
continue;
|
||||
} catch (Exception $e) {
|
||||
$permission = new Permission();
|
||||
|
||||
$permission->name = $key;
|
||||
|
@ -56,3 +65,4 @@ class PermissionSeeder extends Seeder
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue