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

11,598

Your int() should be replaced with integer() in the migrations file. Like this:

$table->integer('user_id');

Share:
11,598
cshoffie
Author by

cshoffie

Updated on July 28, 2022

Comments

  • cshoffie
    cshoffie almost 2 years

    I've compiled a new installation of Laravel 4 and I'm getting this error after I generate a migration and try to migrate it via 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}}

    I've tried recompiling Laravel but to no avail.

    Any ideas or suggestions?

  • Glad To Help
    Glad To Help over 10 years
    @AnaelFavre I agree totally. I assume this will improve over time, as Laravel matures.
  • Nico AD
    Nico AD about 9 years
    agreed too, laravel errors report and stack track are in most cases unclear and not helpful at all