簡體   English   中英

Laravel 4:PHP致命錯誤:調用未定義的方法Blueprint :: int()

[英]Laravel 4: PHP Fatal error: Call to undefined method Blueprint::int()

我編譯了Laravel 4的新安裝,我在生成遷移並嘗試通過工匠遷移后出現此錯誤:

PHP致命錯誤:在第22行的/home/casey/Sites/caseyhoffmann.me/laravel4/app/database/migrations/2013_10_22_232234_create_users_table.php中調用未定義的方法Illuminate \\ Database \\ Schema \\ Blueprint :: int(){“error” :{“type”:“Symfony \\ Component \\ Debug \\ Exception \\ FatalErrorException”,“message”:“調用未定義的方法Illuminate \\ Database \\ Schema \\ Blueprint :: int()”,“file”:“/ home / casey /Sites/caseyhoffmann.me/laravel4/app/database/migrations/2013_10_22_232234_create_users_table.php","line":22}}

我試過重新編譯Laravel但無濟於事。

任何想法或建議?

您的int ()應該在遷移文件中替換為integer() 像這樣:

$table->integer('user_id');

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM