Cómo verificar la URL actual dentro de la declaración @IF en Laravel
@if (request()->is('admin/myRoute'))
[do stuff]
@endif
Worrisome Walrus
@if (request()->is('admin/myRoute'))
[do stuff]
@endif
if (filter_var($string, FILTER_VALIDATE_URL)) {
// you're good
}
Check if URL has certain string with PHP - Stack Overflow