Laravel 9 app cannot see a newly created Controller

Laravel 9 app cannot see a newly created Controller

Error

Target class [AdminToolsController] does not exist.

The syntax for routes is

Route::get(uri, [controller, action])

Example

use App\Http\Controllers\LogoutController;
Route::get(‘/logout’, [LogoutController::class, ‘logout’]);

Or

Route::get(‘/logout’, [\App\Http\Controllers\LogoutController::class, ‘logout’]);

Source:
https://stackoverflow.com/questions/71074220/my-fresh-laravel-9-app-cannot-see-a-controller

 

 

Al Mahbub Khan
Written by Al Mahbub Khan Full-Stack Developer & Adobe Certified Magento Developer

Full-stack developer at Scylla Technologies (USA), working remotely from Bangladesh. Adobe Certified Magento Developer.