| 1 | <?php |
||
| 8 | /** |
||
| 9 | * Run the migrations. |
||
| 10 | * |
||
| 11 | * @return void |
||
| 12 | */ |
||
| 13 | public function up() |
||
| 14 | { |
||
| 15 | |||
| 16 | Schema::create('attacher_images', function (Blueprint $table) |
||
| 17 | { |
||
| 18 | $table->increments('id'); |
||
| 19 | $table->unsignedInteger('owner_id')->index(); |
||
| 20 | $table->string('owner_type')->index(); |
||
| 21 | $table->string('file_extension'); |
||
| 22 | $table->string("file_name")->nullable(); |
||
| 23 | $table->smallInteger("file_size", FALSE, TRUE)->nullable(); |
||
| 24 | $table->string("mime_type")->nullable(); |
||
| 25 | $table->timestamps(); |
||
| 26 | }); |
||
| 27 | |||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Reverse the migrations. |
||
| 32 | * |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | public function down() |
||
| 36 | { |
||
| 37 | Schema::drop('attacher_images'); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |
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.