Laravel4-Vagrant
Laravel4-Vagrant copied to clipboard
Migrate error [ErrorException] Undefined variable: table
Hey,
Getting an error when running php artisan migrate:
[ErrorException]
Undefined variable: table
migrate [--bench[="..."]] [--database[="..."]] [--path[="..."]] [--package[="..."]] [--pretend] [--seed]
Not sure if its something i've done wrong but any suggestions would be appreciated!
Joe
Hey Joe,
This sounds like an error in your Laravel migrations. I could take a quick look at them if you want to make a gist of your migration files (should be in app/database/migrations/) and send it over.
Thanks! -Bryan
You probably forgot to wrap you column generators in Schema::create('users', function($table) {});
Look in your migrations files.. Maybe you use the variable $table but need to use $Table (T uppercase?)
Look table function does not exist Use Schema::create('users', function($table)
@MrDinsdale It can even happen if you've added dropForiegn() or dropColumn() methods unnecessarily in your down() method for a Create Table Migration.
@MrDinsdale maybe the foreign key that you wrote is outside the schema{}
@MrDinsdale In my case solution is this: http://larabrain.com/tips/debugging-laravel-migrations-using-verbose-output
Mercii cette Astuce m'a bien aidé dib90