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