Conditions | 1 |
Paths | 1 |
Total Lines | 28 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create(config('blog.table_prefix', 'blog').'_posts', function (Blueprint $table) { |
||
17 | $table->increments('id'); |
||
18 | $table->integer('category_id')->nullable(); |
||
19 | $table->index('category_id'); |
||
20 | $table->integer('user_id')->nullable(); |
||
21 | $table->index('user_id'); |
||
22 | $table->string('title'); |
||
23 | $table->string('sub_title')->nullable(); |
||
24 | $table->string('slug')->nullable(); |
||
25 | $table->string('excerpt')->nullable(); |
||
26 | $table->text('content')->nullable(); |
||
27 | |||
28 | $table->boolean('allow_comments')->default( |
||
29 | config('blog.posts.allow_comments') |
||
30 | )->nullable(); |
||
31 | |||
32 | $table->boolean('allow_guest_comments')->default( |
||
33 | config('blog.posts.allow_guest_comments') |
||
34 | )->nullable(); |
||
35 | |||
36 | $table->string('status')->nullable(); |
||
37 | $table->timestamp('published_at')->nullable(); |
||
38 | $table->timestamps(); |
||
39 | $table->softDeletes(); |
||
40 | }); |
||
41 | } |
||
42 | |||
53 |