loki icon indicating copy to clipboard operation
loki copied to clipboard

Use request()->segment(1) instead of route()->getPrefix()

Open johnnestebann opened this issue 4 years ago • 2 comments

When I need to add a prefix to some routes, like 'admin', for my backoffice, the $route->getPrefix() respond 'en/admin' instead of 'en' , is more secure to use request()->segment(1)

Using Laravel 7+

johnnestebann avatar Jul 27 '20 05:07 johnnestebann

Hi! @mabasic , there is a problem with this PR?

johnnestebann avatar Jul 30 '20 18:07 johnnestebann

Hi! @mabasic , there is a problem with this PR?

No problem. I need to check the changes, but haven't found the time yet. Will get back to this eventually. Thank you for your PR.

mabasic avatar Jul 31 '20 08:07 mabasic