Skip to content
Advertisement

Laravel : How to check dynamic url using Request::path()

I was trying to show a search box based on url means for specific route it will show the search box otherwise it won’t show. for that i used Request::path() . But the problem is for some route it doesn’t work. Suppose i have two routes, such as

JavaScript

now if i used the following code:

JavaScript

For the products route i could see the search Box but for product/{name} I couldn’t .. How do i solve the issue?

Advertisement

Answer

JavaScript

use

JavaScript

Hope can help you

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement