| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | |||
| 17 | Schema::create('News', function (Blueprint $table) { |
||
| 18 | $table->increments('id'); |
||
| 19 | $table->string('title', 150); |
||
| 20 | $table->text('body'); |
||
| 21 | $table->integer('image')->unsigned()->nullable(); |
||
| 22 | $table->integer('author')->unsigned(); |
||
| 23 | $table->string('news_list', 150); |
||
| 24 | $table->timestamp('release_date')->nullable(); |
||
| 25 | $table->timestamps(); |
||
| 26 | $table->softDeletes(); |
||
| 27 | |||
| 28 | $table->foreign('image')->references('id')->on('File'); |
||
| 29 | $table->foreign('author')->references('id')->on('User'); |
||
| 30 | }); |
||
| 31 | |||
| 32 | } |
||
| 33 | |||
| 47 |
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.