Conditions | 1 |
Paths | 1 |
Total Lines | 22 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function up() |
||
14 | { |
||
15 | DB::statement( "DROP VIEW IF EXISTS admin_count"); |
||
16 | DB::statement( "CREATE VIEW admin_count AS |
||
17 | select count(u.id) |
||
18 | from users u, groups g ,users_groups ug |
||
19 | where |
||
20 | ug.user_id = u.id and |
||
21 | ug.group_id = g.id |
||
22 | "); |
||
23 | |||
24 | DB::table('reports')->insert( |
||
25 | [ |
||
26 | [ |
||
27 | 'report_name' => 'admin_count', |
||
28 | 'view_name' => 'admin_count', |
||
29 | 'created_at' => \DB::raw('NOW()'), |
||
30 | 'updated_at' => \DB::raw('NOW()') |
||
31 | ] |
||
32 | ] |
||
33 | ); |
||
34 | } |
||
35 | |||
45 | } |
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.