我编译了Laravel 4的新安装,我在生成迁移并尝试通过artisan迁移后出现此错误:
PHP Fatal error: Call to undefined method Illuminate\Database\Schema\Blueprint::int() in /home/casey/Sites/caseyhoffmann.me/laravel4/app/database/migrations/2013_10_22_232234_create_users_table.PHP on line 22
{“error”:{“type”:”Symfony\Component\Debug\Exception\FatalErrorException”,”message”:”Call to undefined method 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().像这样:
原文链接:https://www.f2er.com/laravel/136452.html
$table->integer('user_id');