Why is Route not working in Laravel 8 ?

Q & ACategory: LaravelWhy is Route not working in Laravel 8 ?
AvatarBrian asked 1 month ago

My routes are not working saying target class not found??

1 Answers
Best Answer
srx webdesignsrx webdesign Staff answered 1 month ago

 
You have to write the route in the following way:
‘App\Http\Controllers\ProductController@index’
or
use App\Http\Controllers\ProductController;
[Product::class,’index’]