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
Route::get('products','abcontroller@index');
Route::get('product/{name}','abcontroller@searchProduct');
now if i used the following code:
@if(Request::path() == 'products' || Request::path() == 'product/{name}')
// something print
@endif
For the products route i could see the search Box but for product/{name} I couldn't .. How do i solve the issue?
Request::path()value?