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