Closed juliangarcess closed 2 months ago
The route generation helper is not working as expected.
When I ran: route('register') -> throw Symfony\Component\Routing\Exception\RouteNotFoundException Route [register] not defined. route('en.register') -> http://localhost/en/register
route('register')
route('en.register')
composer.json:
{ "name": "laravel/laravel", "type": "project", "description": "The skeleton application for the Laravel framework.", "keywords": ["laravel", "framework"], "license": "MIT", "require": { "php": "^8.2", "codezero/laravel-localized-routes": "^4.0", "laravel/framework": "^11.9", "laravel/tinker": "^2.9" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.13", "fakerphp/faker": "^1.23", "laravel-lang/common": "^6.4", "laravel/pint": "^1.13", "laravel/sail": "^1.26", "mockery/mockery": "^1.6", "nunomaduro/collision": "^8.0", "pestphp/pest": "^2.34", "pestphp/pest-plugin-laravel": "^2.4" }, "autoload": { "psr-4": { "App\": "app/", "Database\Factories\": "database/factories/", "Database\Seeders\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Tests\": "tests/" } }, "scripts": { "post-autoload-dump": [ "Illuminate\Foundation\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" ], "post-update-cmd": [ "@php artisan vendor:publish --tag=laravel-assets --ansi --force", "@php artisan lang:update" ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate --ansi", "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"", "@php artisan migrate --graceful --ansi" ] }, "extra": { "laravel": { "dont-discover": [] } }, "config": { "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true, "allow-plugins": { "pestphp/pest-plugin": true, "php-http/discovery": true, "codezero/composer-preload-files": true } }, "minimum-stability": "stable", "prefer-stable": true }
Look that is an error with the laravel-lang/common package, uninstalled and all works fine
The route generation helper is not working as expected.
When I ran:
route('register')
-> throw Symfony\Component\Routing\Exception\RouteNotFoundException Route [register] not defined.route('en.register')
-> http://localhost/en/registercomposer.json: