Conditions | 1 |
Paths | 1 |
Total Lines | 30 |
Code Lines | 25 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('fight', function(Blueprint $table) { |
||
17 | $table->increments('id'); |
||
18 | $table->integer('round_id')->unsigned()->index(); |
||
19 | $table->foreign('round_id') |
||
20 | ->references('id') |
||
21 | ->on('round') |
||
22 | ->onUpdate('cascade') |
||
23 | ->onDelete('cascade'); |
||
24 | $table->integer('c1')->nullable()->unsigned()->index(); |
||
25 | $table->foreign('c1') |
||
26 | ->references('id') |
||
27 | ->on('users') |
||
28 | ->onUpdate('cascade') |
||
29 | ->onDelete('cascade'); |
||
30 | |||
31 | $table->integer('c2')->nullable()->unsigned()->index(); |
||
32 | $table->foreign('c2') |
||
33 | ->references('id') |
||
34 | ->on('users') |
||
35 | ->onUpdate('cascade') |
||
36 | ->onDelete('cascade'); |
||
37 | |||
38 | $table->tinyInteger("area"); |
||
39 | $table->tinyInteger("order"); |
||
40 | $table->timestamps(); |
||
41 | $table->engine = 'InnoDB'; |
||
42 | }); |
||
43 | } |
||
44 | |||
57 |
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.