Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function up() |
||
16 | { |
||
17 | $connection = config('categorizable.connection'); |
||
18 | |||
19 | Schema::connection($connection)->create('categories', function (Blueprint $table) { |
||
20 | $table->increments('id'); |
||
21 | $table->string('name'); |
||
22 | |||
23 | $table->nestedSet(); |
||
24 | $table->timestamps(); |
||
25 | }); |
||
26 | |||
27 | Schema::connection($connection)->create('categorizable', function (Blueprint $table) { |
||
28 | $table->increments('id'); |
||
29 | $table->unsignedInteger('category_id'); |
||
30 | $table->nullableMorphs('categorizable'); |
||
31 | |||
32 | $table->index('categorizable_type', 'categorizable_id'); |
||
33 | $table->timestamps(); |
||
34 | }); |
||
35 | } |
||
36 | |||
55 |
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.