Skip to content

Instantly share code, notes, and snippets.

@edgrosvenor
Last active June 6, 2020 19:35
Show Gist options
  • Save edgrosvenor/ca03ecf70f60cea9098df0c24e57f875 to your computer and use it in GitHub Desktop.
Save edgrosvenor/ca03ecf70f60cea9098df0c24e57f875 to your computer and use it in GitHub Desktop.
An interesting error encountered in Laravel the route name as a string is returned by the route
Route::group(['prefix' => 'coach/{coach}', 'middleware' => 'auth:coaches'], function() {
Route::get('/', function() { return 'Hello coach-dashboard how are you'; })->name('coach-dashboard');
});
// Log: [2020-06-06 19:24:04] testing.ERROR: Maximum function nesting level of '256' reached, aborting! {"userId":1,"exception":"[object] (Error(code: 0): Maximum function nesting level of '256' reached, aborting! at /Users/ed/Sites/exactsports/virtual-camp/vendor/laravel/framework/src/Illuminate/Container/Container.php:772)
@edgrosvenor
Copy link
Author

I have not yet tried this to see if it happens when returning HTML via a controller, which is ultimately what I'll be doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment