Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
8 | public function up() |
||
9 | { |
||
10 | Schema::create('specs', function (Blueprint $table) { |
||
11 | $table->increments('id'); |
||
12 | $table->string('name'); |
||
13 | $table->unsignedInteger('stock')->default(0); |
||
14 | $table->decimal('price'); |
||
15 | $table->string('sku')->nullable(); |
||
16 | $table->integer('sold_qty')->nullable()->default(0); |
||
17 | $table->morphs('buyable'); |
||
18 | $table->unique(['buyable_type', 'buyable_id', 'name']); |
||
19 | $table->timestamps(); |
||
20 | }); |
||
21 | } |
||
22 | |||
28 |
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.