Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function up() |
||
17 | { |
||
18 | Schema::create(config('cortex.auth.tables.assigned_roles'), function (Blueprint $table) { |
||
19 | // Columns |
||
20 | $table->integer('role_id')->unsigned(); |
||
21 | $table->integer('entity_id')->unsigned(); |
||
22 | $table->string('entity_type', 150); |
||
23 | $table->integer('scope')->nullable(); |
||
24 | |||
25 | // Indexes |
||
26 | $table->index(['scope']); |
||
27 | $table->index(['role_id']); |
||
28 | $table->index(['entity_id', 'entity_type', 'scope'], 'assigned_roles_entity_index'); |
||
29 | $table->foreign('role_id')->references('id')->on(config('cortex.auth.tables.roles')) |
||
30 | ->onDelete('cascade')->onUpdate('cascade'); |
||
31 | }); |
||
32 | } |
||
33 | |||
44 |
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.