| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | protected function createPivot(string $table, string $first_table, string $second_table, string $first_key, string $second_key) |
||
| 25 | { |
||
| 26 | $this->create($table, function (Blueprint $table) use ($first_table, $second_table, $first_key, $second_key) { |
||
| 27 | $table->unsignedBigInteger($first_key)->index(); |
||
| 28 | $table->unsignedBigInteger($second_key); |
||
| 29 | |||
| 30 | $table->foreign($first_key)->references('id')->on($first_table)->onDelete('cascade'); |
||
| 31 | $table->foreign($second_key)->references('id')->on($second_table)->onDelete('cascade'); |
||
| 32 | }); |
||
| 35 |