In blade, If we want to check that the current route matches with a route or not, we can simply use:
@if(Route::currentRouteName() == 'parameter')
{{ 'yes' }}
@else
{{ 'no' }}
@endif
But what if we want to match it with a wildcard like:
@if(Route::currentRouteName() == 'parameter.*')
{{ 'yes' }}
@else
{{ 'no' }}
@endif
Is there any solution for that?
I have tried "*" and ":any", but it didn't work.
Note: I want to check route, not URL.
Any help would be appreciated.
Thanks,
Parth Vora