1 | <?php
|
---|
2 |
|
---|
3 | namespace Database\Seeders;
|
---|
4 |
|
---|
5 | use Illuminate\Database\Seeder;
|
---|
6 |
|
---|
7 | class RolesPermissionsTableSeeder extends Seeder
|
---|
8 | {
|
---|
9 | /**
|
---|
10 | * Run the database seeds.
|
---|
11 | *
|
---|
12 | * @return void
|
---|
13 | */
|
---|
14 | public function run()
|
---|
15 | {
|
---|
16 | \DB::table('roles_permissions')->insert([
|
---|
17 | // Admin
|
---|
18 | ["role_id" => 1, "permission_id" => 1],
|
---|
19 | ["role_id" => 1, "permission_id" => 2],
|
---|
20 | ["role_id" => 1, "permission_id" => 3],
|
---|
21 | ["role_id" => 1, "permission_id" => 4],
|
---|
22 | ["role_id" => 1, "permission_id" => 5],
|
---|
23 | ["role_id" => 1, "permission_id" => 6],
|
---|
24 | ["role_id" => 1, "permission_id" => 7],
|
---|
25 | ["role_id" => 1, "permission_id" => 8],
|
---|
26 | ["role_id" => 1, "permission_id" => 9],
|
---|
27 | ["role_id" => 1, "permission_id" => 10],
|
---|
28 |
|
---|
29 | // Referent
|
---|
30 | ["role_id" => 2, "permission_id" => 3],
|
---|
31 | ["role_id" => 2, "permission_id" => 4],
|
---|
32 | ["role_id" => 2, "permission_id" => 5],
|
---|
33 | ["role_id" => 2, "permission_id" => 6],
|
---|
34 | ["role_id" => 2, "permission_id" => 7],
|
---|
35 | ["role_id" => 2, "permission_id" => 8],
|
---|
36 | ["role_id" => 2, "permission_id" => 9],
|
---|
37 | ["role_id" => 2, "permission_id" => 10],
|
---|
38 |
|
---|
39 | // Viewer
|
---|
40 | ["role_id" => 3, "permission_id" => 5],
|
---|
41 | ["role_id" => 3, "permission_id" => 6],
|
---|
42 | ]);
|
---|
43 | }
|
---|
44 | }
|
---|