Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to prepare route [panel/admin/languages] for serialization. Another route has already been assigned name [languages.index]. #262

Open
ghost opened this issue Dec 13, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 13, 2022

Cannot cache route
When php artisan route:cache entered, thrown error with
Unable to prepare route [panel/admin/languages] for serialization. Another route has already been assigned name [languages.index].

# php artisan route:cache

   LogicException

  Unable to prepare route [panel/admin/languages] for serialization. Another route has already been assigned name [languages.index].

  at C:\xampp\htdocs\1\vendor\laravel\framework\src\Illuminate\Routing\AbstractRouteCollection.php:219
    215▕             $route->name($this->generateRouteName());
    216▕
    217▕             $this->add($route);
    218▕         } elseif (! is_null($symfonyRoutes->get($name))) {
  ➜ 219▕             throw new LogicException("Unable to prepare route [{$route->uri}] for serialization. Another route has already been assigned name [{$name}].");
    220▕         }
    221▕
    222▕         $symfonyRoutes->add($route->getName(), $route->toSymfonyRoute());
    223▕

  1   C:\xampp\htdocs\1\vendor\laravel\framework\src\Illuminate\Routing\AbstractRouteCollection.php:180
      Illuminate\Routing\AbstractRouteCollection::addToSymfonyRoutesCollection(Object(Symfony\Component\Routing\RouteCollection), Object(Illuminate\Routing\Route))

  2   C:\xampp\htdocs\1\vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php:246
      Illuminate\Routing\AbstractRouteCollection::toSymfonyRouteCollection()
@askaralimkndr
Copy link

Is this solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant