2014-10-16 18 views
5

Jestem nowy na laravel 4, w moim pierwszym projekcie, gdy próbuję przenieść to mam ten błąd:Call to metoda niezdefiniowany Illuminate \ \ Database Schema \ Blueprint :: krokach()

Utworzono tabelę migracji. {"błąd": {"typ": "Symfony \ Komponent \ Debug \ Wyjątek \ FatalErrorException", "message": "Zadzwoń do undefiend method Iluminuj \ Baza danych \ Schemat \ Blueprint :: przyrostki()", "plik ":" foo”, "linia: 19"}}

A to mój kod migracja 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'); 
} 

} 

Może ktoś mi pomóc rozwiązać ten błąd?

Odpowiedz

10

Masz literówkę.

Zamiast:

$table->incremetns('id'); 

powinny być

$table->increments('id'); 
Powiązane problemy