I’m using Laravel 8 and I wanted to use the old way of calling controller and routes in
So instead of saying this:
Route::get('/home', [AppHttpControllersHomeController::class, 'index'])->name('home');
I would call the Controller like this:
Route::get('/home', '[email protected]')->name('home');
So I added this to
public function boot()
->namespace('AppHttpControllers') // <---------
But it doesn’t seem to be working because I’m getting this error:
Target class [HomeController] does not exist.
So how can I call my Controller at
web.php like the old style which was used in Laravel 5 versions?
from Newest questions tagged laravel-5 – Stack Overflow https://ift.tt/2Z6dOBF