Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('products', function (Blueprint $table) { |
||
17 | $table->bigIncrements('id'); |
||
18 | $table->unsignedBigInteger('category_id'); |
||
19 | $table->string('name'); |
||
20 | $table->string('slug')->unique(); |
||
21 | $table->mediumText('short_description')->nullable(); |
||
22 | $table->text('description')->nullable(); |
||
23 | $table->boolean('is_active'); |
||
24 | $table->timestamps(); |
||
25 | |||
26 | $table->foreign('category_id') |
||
27 | ->references('id') |
||
28 | ->on('product_categories') |
||
29 | ->onDelete('cascade'); |
||
30 | }); |
||
43 |