Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
13 | public function up() |
||
14 | { |
||
15 | 9 | Schema::create('league_team_user', function(Blueprint $table) |
|
16 | { |
||
17 | 9 | $table->increments('id'); |
|
18 | 9 | $table->unsignedInteger('league_team_id'); |
|
19 | 9 | $table->unsignedInteger('user_id'); |
|
20 | 9 | $table->timestamps(); |
|
21 | |||
22 | 9 | $table->foreign('league_team_id') |
|
23 | 9 | ->references('id')->on('league_teams') |
|
24 | 9 | ->onDelete('cascade')->onUpdate('cascade'); |
|
25 | |||
26 | 9 | $table->foreign('user_id') |
|
27 | 9 | ->references('id')->on('users') |
|
28 | 9 | ->onDelete('cascade')->onUpdate('cascade'); |
|
29 | 9 | }); |
|
30 | 9 | } |
|
31 | |||
43 |
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.