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