Function () does not exist
When I am submitting a form, my laravel application is showing this bunch of errors.
ReflectionException in Route.php line 152:
Function () does not exist
Please help me to resolve the issue. Thank you.
The code? (check your route.php file)
@emamul-andalib
Are you using middleware in the route?
If yes, check you might forgot 'uses' key? ..e.g.
Route::get('foo/bar/{id}', ['middleware'=>'auth', 'uses'=>'FooController@show']);
You are right @bimalshah72, I got the solution. Thank you :)
As this page ranks in highly in Google I also got the same error due to an incorrect route definition of an invokable controller.
$r->get('{id}/verify-email', [PurchaseOrders\AnalysisController::class])
caused the error. Removing the wrapping array resolved the issue:
$r->get('{id}/verify-email', PurchaseOrders\AnalysisController::class)
Sometimes this happens when you don't specify the controller method of a route.
Please or to participate in this conversation.