Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function run() |
||
13 | { |
||
14 | $adminGroupId = DB::table('groups')->where('name', 'Admin')->first()->id; |
||
15 | $adminUserId = DB::table('users')->where('email', '[email protected]')->first()->id; |
||
16 | $permissions = DB::table('permissions')->whereIn('model', ['users', 'permissions', 'groups']); |
||
17 | |||
18 | DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete(); |
||
19 | DB::table('users_groups')->where('user_id', $adminUserId)->where('group_id', $adminGroupId)->delete(); |
||
20 | |||
21 | DB::table('users')->where('email', '[email protected]')->delete(); |
||
22 | DB::table('groups')->where('name', 'Admin')->delete(); |
||
23 | |||
24 | $permissions->delete(); |
||
25 | } |
||
26 | } |
||
27 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.