I am using Laravel 7.x, I have a controller which when called in the routes, instead of loading its own called method, will rather load the method of a different controller, I don't know how and why?
I.e. Controller-A executes Controller-B methods which was not called.
So, I am calling the route below from my web.php directory.
Route::get('/testx', 'ControllerA@show_table');
but it loads another ControllerB's method instead thereby loading the wrong route. Does laravel cache controllers? Its a strange logic error to me.
php artisan route:clear
(laravel may be caching routes, not controllers) – Alberto Sinigaglia/testx
route in your web.php? – zlatan/{something}
in your routes file. Make sure that route is below everything else, especially the/testx
route – aynber