Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function up() { |
||
13 | Schema::create('files', function(Blueprint $table) { |
||
14 | $table->increments('id'); |
||
15 | $table->string('filepath')->collation('utf8_bin'); |
||
16 | $table->string('filename'); |
||
17 | $table->datetime('created_at'); |
||
18 | $table->integer('created_by')->nullable(); |
||
19 | }); |
||
20 | |||
21 | Schema::create('files_usage', function(Blueprint $table) { |
||
22 | $table->integer('file_id')->unsigned()->index(); |
||
23 | $table->string('used_type')->index(); |
||
24 | $table->string('used_id')->index(); |
||
25 | $table->datetime('created_at'); |
||
26 | $table->integer('created_by')->nullable(); |
||
27 | |||
28 | $table->foreign('file_id')->references('id')->on('files')->onDelete('cascade'); |
||
29 | }); |
||
30 | } |
||
31 | |||
46 |
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.