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