BadMethodCallException in Macroable.php line 74 : Method controller does not exist

Faced the same problem recently. Laravel 5.3 does not support Route::controller() method. You need to change it to Route::get(). Please check how to use it here https://laravel.com/docs/5.3/routing#basic-routing.


Please also make sure you don't use any namespace inside your routes file.

E.g. If by mistake your IDE add's

use Illuminate\Routing\Route;

It could result in the same error mentioned above. Your route file (web.php or api.php) should not use the Illuminate\Routing\Route class.

EDIT: Tested on Laravel 5.5


I got this error while running artisan command. Finally, I solve by removing the,

use Illuminate\Routing\Route

in web.php file.

Tags:

Laravel 5