You can cannot cache routes that use Closure's.
"If your application is exclusively using controller routes, you may take advantage of Laravel's route cache.".
You must have already cached your routes then added a new one with a Closure which would give you that error when you go to clear the route cache to generate a new one.
You can do the following though:
Route::group(['prefix' => 'admin'], function() {
Route::get('/', 'MyController@index');
});
Thanks
I wouldn't have thought of looking under controllers for that information.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community