Привет создаю миграцию для постов
вот код
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePostsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->string('title');
$table->string('images')->nullable();
$table->string('slug')->unique();
$table->text('description')->nullable();
$table->text('text');
$table->date('date')->nullable();
$table->boolean('view')->default(1);
$table->integer('category_id')->nullable();
$table->foreign('category_id')->references('id')->on('сategories');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('posts');
}
}
а вот ошибка
что не правельно сделал