| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function up() |
||
| 14 | { |
||
| 15 | 152 | Schema::create('business_contact', 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('contact_id')->unsigned()->index(); |
|
| 19 | 152 | $table->foreign('contact_id')->references('id')->on('contacts')->onDelete('cascade'); |
|
| 20 | 152 | $table->string('notes')->nullable(); |
|
| 21 | 152 | $table->nullableTimestamps(); |
|
| 22 | |||
| 23 | 152 | $table->unique(['business_id', 'contact_id']); |
|
| 24 | 152 | }); |
|
| 25 | 152 | } |
|
| 26 | |||
| 37 |
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.