add ignore unamed route

This commit is contained in:
Jérémy Munsch 2023-05-22 16:27:28 +02:00
parent c101d18a46
commit 0bb384f0ea
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC

View file

@ -216,7 +216,13 @@ final class SitemapGenerator
// * If the route has no dynamic models as parameters.
if (!count($params) or !$hasModels) {
$rName = $route->getName();
$rName = $route->getName();
if (!$route->getName()) {
if (\config('app.debug')) {
\dump(\sprintf('Ignore unamed route %s', $route->getActionName()));
}
return;
}
$generatedUris[] = [
route($route->getName()),
self::getRouteFrequency($rName),