Skip to content

Commit

Permalink
Permissions seeder
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Feb 25, 2021
1 parent adeb80b commit 8410447
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 45 deletions.
40 changes: 40 additions & 0 deletions src/database/seeders/PermissionRoleSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,46 @@ public function run()
['permission_id' => 47, 'role_id' => 1],
['permission_id' => 48, 'role_id' => 1],
['permission_id' => 49, 'role_id' => 1],
['permission_id' => 50, 'role_id' => 1],
['permission_id' => 51, 'role_id' => 1],
['permission_id' => 52, 'role_id' => 1],
['permission_id' => 53, 'role_id' => 1],
['permission_id' => 54, 'role_id' => 1],
['permission_id' => 55, 'role_id' => 1],
['permission_id' => 56, 'role_id' => 1],
['permission_id' => 57, 'role_id' => 1],
['permission_id' => 58, 'role_id' => 1],
['permission_id' => 59, 'role_id' => 1],
['permission_id' => 60, 'role_id' => 1],
['permission_id' => 61, 'role_id' => 1],
['permission_id' => 62, 'role_id' => 1],
['permission_id' => 63, 'role_id' => 1],
['permission_id' => 64, 'role_id' => 1],
['permission_id' => 65, 'role_id' => 1],
['permission_id' => 66, 'role_id' => 1],
['permission_id' => 67, 'role_id' => 1],
['permission_id' => 68, 'role_id' => 1],
['permission_id' => 69, 'role_id' => 1],
['permission_id' => 70, 'role_id' => 1],
['permission_id' => 71, 'role_id' => 1],
['permission_id' => 72, 'role_id' => 1],
['permission_id' => 73, 'role_id' => 1],
['permission_id' => 74, 'role_id' => 1],
['permission_id' => 75, 'role_id' => 1],
['permission_id' => 76, 'role_id' => 1],
['permission_id' => 77, 'role_id' => 1],
['permission_id' => 78, 'role_id' => 1],
['permission_id' => 79, 'role_id' => 1],
['permission_id' => 80, 'role_id' => 1],
['permission_id' => 81, 'role_id' => 1],
['permission_id' => 82, 'role_id' => 1],
['permission_id' => 83, 'role_id' => 1],
['permission_id' => 84, 'role_id' => 1],
['permission_id' => 85, 'role_id' => 1],
['permission_id' => 86, 'role_id' => 1],
['permission_id' => 87, 'role_id' => 1],
['permission_id' => 88, 'role_id' => 1],
['permission_id' => 89, 'role_id' => 1],
];

DB::table('permission_role')->insert($typi_permission_role);
Expand Down
130 changes: 85 additions & 45 deletions src/database/seeders/PermissionSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,55 +10,95 @@ class PermissionSeeder extends Seeder
public function run()
{
$typi_permissions = [
['id' => 1, 'name' => 'see navbar', 'guard_name' => 'web'],
['id' => 2, 'name' => 'see dashboard', 'guard_name' => 'web'],
['id' => 3, 'name' => 'see history', 'guard_name' => 'web'],
['id' => 4, 'name' => 'read settings', 'guard_name' => 'web'],
['id' => 5, 'name' => 'update settings', 'guard_name' => 'web'],
['id' => 6, 'name' => 'clear history', 'guard_name' => 'web'],
['id' => 7, 'name' => 'change locale', 'guard_name' => 'web'],
['id' => 8, 'name' => 'update preferencess', 'guard_name' => 'web'],
['id' => 9, 'name' => 'clear cache', 'guard_name' => 'web'],
['id' => 10, 'name' => 'read blocks', 'guard_name' => 'web'],
['id' => 11, 'name' => 'create blocks', 'guard_name' => 'web'],
['id' => 12, 'name' => 'update blocks', 'guard_name' => 'web'],
['id' => 13, 'name' => 'delete blocks', 'guard_name' => 'web'],
['id' => 14, 'name' => 'read files', 'guard_name' => 'web'],
['id' => 15, 'name' => 'create files', 'guard_name' => 'web'],
['id' => 16, 'name' => 'update files', 'guard_name' => 'web'],
['id' => 17, 'name' => 'delete files', 'guard_name' => 'web'],
['id' => 18, 'name' => 'read page_sections', 'guard_name' => 'web'],
['id' => 19, 'name' => 'create page_sections', 'guard_name' => 'web'],
['id' => 20, 'name' => 'update page_sections', 'guard_name' => 'web'],
['id' => 21, 'name' => 'delete page_sections', 'guard_name' => 'web'],
['id' => 22, 'name' => 'read menus', 'guard_name' => 'web'],
['id' => 23, 'name' => 'create menus', 'guard_name' => 'web'],
['id' => 24, 'name' => 'update menus', 'guard_name' => 'web'],
['id' => 25, 'name' => 'delete menus', 'guard_name' => 'web'],
['id' => 26, 'name' => 'read pages', 'guard_name' => 'web'],
['id' => 27, 'name' => 'create pages', 'guard_name' => 'web'],
['id' => 28, 'name' => 'update pages', 'guard_name' => 'web'],
['id' => 29, 'name' => 'delete pages', 'guard_name' => 'web'],
['id' => 30, 'name' => 'read roles', 'guard_name' => 'web'],
['id' => 31, 'name' => 'create roles', 'guard_name' => 'web'],
['id' => 32, 'name' => 'update roles', 'guard_name' => 'web'],
['id' => 33, 'name' => 'delete roles', 'guard_name' => 'web'],
['id' => 34, 'name' => 'read translations', 'guard_name' => 'web'],
['id' => 35, 'name' => 'create translations', 'guard_name' => 'web'],
['id' => 36, 'name' => 'update translations', 'guard_name' => 'web'],
['id' => 37, 'name' => 'delete translations', 'guard_name' => 'web'],
['id' => 38, 'name' => 'read users', 'guard_name' => 'web'],
['id' => 39, 'name' => 'create users', 'guard_name' => 'web'],
['id' => 40, 'name' => 'update users', 'guard_name' => 'web'],
['id' => 41, 'name' => 'delete users', 'guard_name' => 'web'],
['id' => 42, 'name' => 'read tags', 'guard_name' => 'web'],
['id' => 43, 'name' => 'create tags', 'guard_name' => 'web'],
['id' => 44, 'name' => 'update tags', 'guard_name' => 'web'],
['id' => 45, 'name' => 'delete tags', 'guard_name' => 'web'],
['id' => 1, 'name' => 'change locale', 'guard_name' => 'web'],
['id' => 2, 'name' => 'update preferences', 'guard_name' => 'web'],
['id' => 3, 'name' => 'clear cache', 'guard_name' => 'web'],
['id' => 4, 'name' => 'see navbar', 'guard_name' => 'web'],
['id' => 5, 'name' => 'see dashboard', 'guard_name' => 'web'],
['id' => 6, 'name' => 'read settings', 'guard_name' => 'web'],
['id' => 7, 'name' => 'update settings', 'guard_name' => 'web'],
['id' => 8, 'name' => 'see history', 'guard_name' => 'web'],
['id' => 9, 'name' => 'clear history', 'guard_name' => 'web'],
['id' => 10, 'name' => 'see unpublished items', 'guard_name' => 'web'],
['id' => 11, 'name' => 'read subscriptions', 'guard_name' => 'web'],
['id' => 12, 'name' => 'read news', 'guard_name' => 'web'],
['id' => 13, 'name' => 'create news', 'guard_name' => 'web'],
['id' => 14, 'name' => 'update news', 'guard_name' => 'web'],
['id' => 15, 'name' => 'delete news', 'guard_name' => 'web'],
['id' => 16, 'name' => 'read places', 'guard_name' => 'web'],
['id' => 17, 'name' => 'create places', 'guard_name' => 'web'],
['id' => 18, 'name' => 'update places', 'guard_name' => 'web'],
['id' => 19, 'name' => 'delete places', 'guard_name' => 'web'],
['id' => 20, 'name' => 'read blocks', 'guard_name' => 'web'],
['id' => 21, 'name' => 'create blocks', 'guard_name' => 'web'],
['id' => 22, 'name' => 'update blocks', 'guard_name' => 'web'],
['id' => 23, 'name' => 'delete blocks', 'guard_name' => 'web'],
['id' => 24, 'name' => 'read project_categories', 'guard_name' => 'web'],
['id' => 25, 'name' => 'create project_categories', 'guard_name' => 'web'],
['id' => 26, 'name' => 'update project_categories', 'guard_name' => 'web'],
['id' => 27, 'name' => 'delete project_categories', 'guard_name' => 'web'],
['id' => 28, 'name' => 'read contacts', 'guard_name' => 'web'],
['id' => 29, 'name' => 'create contacts', 'guard_name' => 'web'],
['id' => 30, 'name' => 'update contacts', 'guard_name' => 'web'],
['id' => 31, 'name' => 'delete contacts', 'guard_name' => 'web'],
['id' => 32, 'name' => 'read events', 'guard_name' => 'web'],
['id' => 33, 'name' => 'create events', 'guard_name' => 'web'],
['id' => 34, 'name' => 'update events', 'guard_name' => 'web'],
['id' => 35, 'name' => 'delete events', 'guard_name' => 'web'],
['id' => 36, 'name' => 'read files', 'guard_name' => 'web'],
['id' => 37, 'name' => 'create files', 'guard_name' => 'web'],
['id' => 38, 'name' => 'update files', 'guard_name' => 'web'],
['id' => 39, 'name' => 'delete files', 'guard_name' => 'web'],
['id' => 40, 'name' => 'read forum_categories', 'guard_name' => 'web'],
['id' => 41, 'name' => 'create forum_categories', 'guard_name' => 'web'],
['id' => 42, 'name' => 'update forum_categories', 'guard_name' => 'web'],
['id' => 43, 'name' => 'delete forum_categories', 'guard_name' => 'web'],
['id' => 44, 'name' => 'read forum_discussions', 'guard_name' => 'web'],
['id' => 45, 'name' => 'delete forum_discussions', 'guard_name' => 'web'],
['id' => 46, 'name' => 'read menulinks', 'guard_name' => 'web'],
['id' => 47, 'name' => 'create menulinks', 'guard_name' => 'web'],
['id' => 48, 'name' => 'update menulinks', 'guard_name' => 'web'],
['id' => 49, 'name' => 'delete menulinks', 'guard_name' => 'web'],
['id' => 50, 'name' => 'read menus', 'guard_name' => 'web'],
['id' => 51, 'name' => 'create menus', 'guard_name' => 'web'],
['id' => 52, 'name' => 'update menus', 'guard_name' => 'web'],
['id' => 53, 'name' => 'delete menus', 'guard_name' => 'web'],
['id' => 54, 'name' => 'read pages', 'guard_name' => 'web'],
['id' => 55, 'name' => 'create pages', 'guard_name' => 'web'],
['id' => 56, 'name' => 'update pages', 'guard_name' => 'web'],
['id' => 57, 'name' => 'delete pages', 'guard_name' => 'web'],
['id' => 58, 'name' => 'read partners', 'guard_name' => 'web'],
['id' => 59, 'name' => 'create partners', 'guard_name' => 'web'],
['id' => 60, 'name' => 'update partners', 'guard_name' => 'web'],
['id' => 61, 'name' => 'delete partners', 'guard_name' => 'web'],
['id' => 62, 'name' => 'read projects', 'guard_name' => 'web'],
['id' => 63, 'name' => 'create projects', 'guard_name' => 'web'],
['id' => 64, 'name' => 'update projects', 'guard_name' => 'web'],
['id' => 65, 'name' => 'delete projects', 'guard_name' => 'web'],
['id' => 66, 'name' => 'read roles', 'guard_name' => 'web'],
['id' => 67, 'name' => 'create roles', 'guard_name' => 'web'],
['id' => 68, 'name' => 'update roles', 'guard_name' => 'web'],
['id' => 69, 'name' => 'delete roles', 'guard_name' => 'web'],
['id' => 70, 'name' => 'read page_sections', 'guard_name' => 'web'],
['id' => 71, 'name' => 'create page_sections', 'guard_name' => 'web'],
['id' => 72, 'name' => 'update page_sections', 'guard_name' => 'web'],
['id' => 73, 'name' => 'delete page_sections', 'guard_name' => 'web'],
['id' => 74, 'name' => 'read slides', 'guard_name' => 'web'],
['id' => 75, 'name' => 'create slides', 'guard_name' => 'web'],
['id' => 76, 'name' => 'update slides', 'guard_name' => 'web'],
['id' => 77, 'name' => 'delete slides', 'guard_name' => 'web'],
['id' => 78, 'name' => 'read tags', 'guard_name' => 'web'],
['id' => 79, 'name' => 'create tags', 'guard_name' => 'web'],
['id' => 80, 'name' => 'update tags', 'guard_name' => 'web'],
['id' => 81, 'name' => 'delete tags', 'guard_name' => 'web'],
['id' => 82, 'name' => 'read translations', 'guard_name' => 'web'],
['id' => 83, 'name' => 'create translations', 'guard_name' => 'web'],
['id' => 84, 'name' => 'update translations', 'guard_name' => 'web'],
['id' => 85, 'name' => 'delete translations', 'guard_name' => 'web'],
['id' => 86, 'name' => 'read users', 'guard_name' => 'web'],
['id' => 87, 'name' => 'create users', 'guard_name' => 'web'],
['id' => 88, 'name' => 'update users', 'guard_name' => 'web'],
['id' => 89, 'name' => 'delete users', 'guard_name' => 'web'],
];

DB::table('permissions')->insert($typi_permissions);
Expand Down

0 comments on commit 8410447

Please sign in to comment.