I am in big problem. I am trying to rum php artisan migrate to generate table migration, but i am getting
[2016-03-08 05:49:01] local.ERR
I ran it to a similar problem.
Seems like I executed a Model query in the routes file. So it executes every time, even before running the actual migration.
//Problematic code
Route::view('users', 'users', [ 'users' => User::all() ]);
So I changed it to
Route::get('/users', function () {
return view('users', ['users' => User::all()]);
});
And everything works fine. Make sure that no Model queries is excecuted on the execution path and then try migrating.