You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 18, 2020. It is now read-only.
I'm trying to use the App::missing() handler to handle my 404 errors nicely, while still having a call to Breadcrumbs::renderIfExists() in my parent template (Which I am expecting to not load any breadcrumbs).
However, if the page is 404ing and the route is not set anywhere, I get this error:
Symfony \ Component \ Debug \ Exception \ FatalErrorException
Call to a member function getName() on a non-object.
This is because here in /laravel-breadcrumbs/src/DaveJamesMiller/Breadcrumbs/Manager.php:
protected function currentRoute()
{
if ($this->currentRoute)
return $this->currentRoute;
$route = $this->router->current();
$name = $route->getName();
//...
It tries to access the getName() function of a route that doesn't exist.
For example if you have no route called "dfpoigsjpdofg" and you go to that URI App::missing() will handle the error, and I want to use my parent template to style a nice 404 page, but I have to override the breadcrumb call or else it'll error out like this.
If you'd be interested in merging this in, I'd be willing to add it in and drop you a pull request for it.
The text was updated successfully, but these errors were encountered:
I'm trying to use the App::missing() handler to handle my 404 errors nicely, while still having a call to Breadcrumbs::renderIfExists() in my parent template (Which I am expecting to not load any breadcrumbs).
However, if the page is 404ing and the route is not set anywhere, I get this error:
This is because here in /laravel-breadcrumbs/src/DaveJamesMiller/Breadcrumbs/Manager.php:
It tries to access the getName() function of a route that doesn't exist.
For example if you have no route called "dfpoigsjpdofg" and you go to that URI App::missing() will handle the error, and I want to use my parent template to style a nice 404 page, but I have to override the breadcrumb call or else it'll error out like this.
If you'd be interested in merging this in, I'd be willing to add it in and drop you a pull request for it.
The text was updated successfully, but these errors were encountered: