Closed vincent-tarrit closed 1 year ago
To add details, the Route::localized is not recognized by PhpStorm...
Hello,
Thanks for reporting the issue. This is probably caused by this line of code.
However, I can't reproduce the issue in a test. Does it fail on a specific route?
Edit: When hitting a regular or fallback route, there should always be a Route
instance in the request as far as I know.
Only when a 404 is thrown will there be no Route
instance , because no route is registered for the URL.
But middleware wil not run on a 404, so I don't know how this can happen.
To add details, the Route::localized is not recognized by PhpStorm...
PhpStorm should autocomplete this if you use https://github.com/barryvdh/laravel-ide-helper.
I have this in my scripts
section of composer.json
:
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"@php artisan ide-helper:generate",
"@php artisan ide-helper:meta"
]
Hello, sorry ... I was not very wake up... I put the middleware in wrong array oups... everything works perfectly! Thank you !
No worries, glad it works :)
Hello, I have issue that my $request->route() is null in the file Middleware/Detectors/ RouteActionDetector.php:36
Could you help me ?
Thank you very much !