I have just run into the same problem.
This simple route throws the errors mentioned above.
Route::get('/', ['middleware' => 'auth', function()
{
return view('home');
}]);
Instead of scratching my head and trying to debug laravel logic, I just changed it to use a controller.
Route::get('/', ['middleware' => 'auth',
'uses' => 'HomeController@index']);
At that point I might as well throw the auth call into the HomeController constructor....
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.