Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
13 | public function up() { |
||
14 | 9 | Schema::create('league_teams', function (Blueprint $table) { |
|
15 | 9 | $table->increments('id'); |
|
16 | 9 | $table->unsignedInteger('league_id'); |
|
17 | 9 | $table->string('name'); |
|
18 | 9 | $table->timestamps(); |
|
19 | |||
20 | 9 | $table->foreign('league_id') |
|
21 | 9 | ->references('id')->on('leagues') |
|
22 | 9 | ->onUpdate('cascade')->onDelete('cascade'); |
|
23 | |||
24 | 9 | }); |
|
25 | 9 | } |
|
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.