I am new to laravel 4 and in my first project, when I try to migrate, I got this error:
The migration table was created successfully. {"Error": {"Type": "Symfony \ Component \ Debug \ Exception \ FatalErrorException", "message": "Call undefiend method Illuminate \ Database \ Schemas \ Blueprint :: increments ()", "file": "Foo "," line: 19 "}}
And this is my transition code in app\migration\2014_10_14_114343_add_cats_and_breeds_table.php :
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddCatsAndBreedsTable extends Migration { public function up() { Schema::create('cats', function($table){ $table->increments('id'); $table->string('name'); $table->date('date_of_birth')->nullable(); $table->integer('breed_id')->nullable(); $table->timestamps(); }); Schema::create('breeds', function($table){ $table->incremetns('id'); $table->string('name'); }); } public function down() { Schema::drop('cats'); Schema::drop('breeds'); } }
Can someone help me fix the error?
source share