Why is Route not working in Laravel 8 ?

Q & ACategory: LaravelWhy is Route not working in Laravel 8 ?
Brian asked 8 months ago

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

1 Answers
Best Answer
srx webdesign Staff answered 8 months 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’]