Answer the question
In order to leave comments, you need to log in
Why doesn't CORS work when added to a route group?
Such a problem. If you do this, then it works:
Route::get('jobs', ['middleware' => 'cors', function()
{
$jobs = Job::all();
return Response::json( [ 'jobs' => $jobs ]);
}]);
FatalThrowableError in Router.php line 391:
Type error: Argument 2 passed to Illuminate\Routing\Router::group() must be an instance of Closure, none given, called in
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question