lundi 4 mai 2020

How to check if current url is top page in laravel blade?

I want to change title tag only if current url is top page. so I wrote on blade:

@if (\Request::is('/*'))
<title>You are on the article page</title>
@else
<title>You are on the top page</title>
@endif

and several similar way I tried, but didn't work. What should I do in this case? Thank you.

Aucun commentaire:

Enregistrer un commentaire