hi I want to use this in laravel
Route::get('/a',fn() => view('a'));
instead of :
Route::get('/a', function () {
return view('a');
});
but it doesn't work
hi I want to use this in laravel
Route::get('/a',fn() => view('a'));
instead of :
Route::get('/a', function () {
return view('a');
});
but it doesn't work
I tried Route::get('/a',fn() => view('welcome')); and worked fine.
Did you check that the view 'a' exists?
Give more detail of the error. Maybe is something else that is not working.