Level 102
Make sure you don't have two routes named restaurant.payment.information
It's in the error message
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am running php artisan route:cache and I am getting below error.
Unable to prepare route [restaurant/payment/information] for serialization. Another route has already been assigned name [restaurant.payment.information].
at vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php:218
214▕ $route->name($name = $this->generateRouteName());
215▕
216▕ $this->add($route);
217▕ } elseif (! is_null($symfonyRoutes->get($name))) {
➜ 218▕ throw new LogicException("Unable to prepare route [{$route->uri}] for serialization. Another route has already been assigned name [{$name}].");
219▕ }
220▕
221▕ $symfonyRoutes->add($route->getName(), $route->toSymfonyRoute());
222▕
+19 vendor frames
20 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
How to solve this issue ?
Please or to participate in this conversation.