I am using laravel8. I created resource controller. when I am using get method for that then it is giving error.
My route is:
Route::resource('/details', [App\Http\Controllers\detailController::class]);
In resource controller, I have index method:
public function index()
{
echo 'dd';
}
when I run http://127.0.0.1:8000/details I am getting error.
ErrorException
Array to string conversion
http://127.0.0.1:8000/details
You just have to remove array syntax form the controller name
Route::resource('/details', App\Http\Controllers\detailController::class);