Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('posts', function (Blueprint $table) { |
||
17 | $table->id('id'); |
||
18 | $table->foreignId('category_id')->constrained('post_categories'); |
||
19 | $table->foreignId('user_id')->constrained(); |
||
20 | |||
21 | /*$table->integer('category_id')->unsigned(); |
||
22 | $table->foreign('category_id')->references('id')->on('post_categories');*/ |
||
23 | |||
24 | $table->string('title'); |
||
25 | $table->text('intro_text'); |
||
26 | $table->text('body'); |
||
27 | $table->boolean('featured')->default(0); |
||
28 | $table->text('before_content')->nullable(); |
||
29 | $table->text('after_content')->nullable(); |
||
30 | $table->string('introimage')->nullable(); |
||
31 | $table->string('introimage_alt')->nullable(); |
||
32 | |||
33 | $table->datetime('publish_at')->nullable(); |
||
34 | $table->datetime('publish_until')->nullable(); |
||
35 | //$table->boolean('is_published')->default(false); |
||
36 | $table->string('slug'); |
||
37 | $table->timestamps(); |
||
38 | }); |
||
51 |