1 | <?php |
||
12 | class CategoriesPermissions extends AbstractMigration |
||
|
|||
13 | { |
||
14 | /** |
||
15 | * Migrate Up. |
||
16 | */ |
||
17 | public function up() |
||
18 | { |
||
19 | $data = [ |
||
20 | [ |
||
21 | 'roleId' => 2, |
||
22 | 'module' => 'categories', |
||
23 | 'privilege' => 'Management' |
||
24 | ] |
||
25 | ]; |
||
26 | |||
27 | $privileges = $this->table('acl_privileges'); |
||
28 | $privileges->insert($data) |
||
29 | ->save(); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Migrate Down. |
||
34 | */ |
||
35 | public function down() |
||
36 | { |
||
37 | $this->execute('DELETE FROM acl_privileges WHERE module = "categories"'); |
||
38 | } |
||
39 | } |
||
40 |
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.