Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 11 |
Ratio | 78.57 % |
Changes | 0 |
1 | <?php |
||
13 | public function up() |
||
14 | { |
||
15 | View Code Duplication | Schema::create('videos', function (Blueprint $table) { |
|
16 | $table->increments('id'); |
||
17 | $table->string('name'); |
||
18 | $table->string('category'); |
||
19 | $table->string('path'); |
||
20 | $table->integer('user_id')->unsigned(); |
||
21 | $table->foreign('user_id')->references('id')->on('users') |
||
22 | ->onDelete('cascade') |
||
23 | ->onUpdate('cascade'); |
||
24 | $table->timestamps(); |
||
25 | }); |
||
26 | } |
||
27 | |||
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.