We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function up() |
||
14 | { |
||
15 | Schema::create('articles', function ($table) { |
||
16 | $table->increments('id'); |
||
17 | $table->integer('user_id')->length(10)->unsigned(); |
||
18 | $table->string('content'); |
||
19 | $table->string('metas')->nullable(); |
||
20 | $table->string('tags')->nullable(); |
||
21 | $table->string('extras')->nullable(); |
||
22 | $table->timestamps(); |
||
23 | |||
24 | $table->foreign('user_id') |
||
25 | ->references('id') |
||
26 | ->on('users') |
||
27 | ->onDelete('cascade'); |
||
28 | }); |
||
29 | } |
||
30 | |||
41 |
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.