| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function up() |
||
| 14 | { |
||
| 15 | 152 | Schema::create('business_user', function (Blueprint $table) { |
|
| 16 | 152 | $table->integer('business_id')->unsigned()->index(); |
|
| 17 | 152 | $table->foreign('business_id')->references('id')->on('businesses')->onDelete('cascade'); |
|
| 18 | 152 | $table->integer('user_id')->unsigned()->index(); |
|
| 19 | 152 | $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
|
| 20 | 152 | $table->nullableTimestamps(); |
|
| 21 | 152 | }); |
|
| 22 | 152 | } |
|
| 23 | |||
| 34 |
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.