Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | 10 | Schema::create('tag__tag_translations', function (Blueprint $table) { |
|
17 | 10 | $table->engine = 'InnoDB'; |
|
18 | 10 | $table->increments('id'); |
|
19 | 10 | $table->string('slug'); |
|
20 | 10 | $table->string('name'); |
|
21 | |||
22 | 10 | $table->integer('tag_id')->unsigned(); |
|
23 | 10 | $table->string('locale')->index(); |
|
24 | 10 | $table->unique(['tag_id', 'locale']); |
|
25 | 10 | $table->foreign('tag_id')->references('id')->on('tag__tags')->onDelete('cascade'); |
|
26 | 10 | }); |
|
27 | 10 | } |
|
28 | |||
39 |
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.