increments('id'); $table->string('type', 100); $table->string('title', 255); $table->string('slug')->nullable(); $table->text('content'); $table->dateTime('datetime')->nullable(); $table->integer('user_id')->unsigned()->nullable(); $table->foreign('user_id')->references('id')->on('users')->onDelete('SET NULL'); $table->timestamps(); $table->softDeletes(); $table->boolean('published'); }); DB::statement('ALTER TABLE posts ADD FULLTEXT fulltext_index (type, title, content)'); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('posts'); } }