CyrilFour
2 years ago

Problem with blade and @extends

Posted 2 years ago by CyrilFour

Hi Guys,

I have an issue with @extends, I want ma page to extends the right "master" following the user's role, but instead of choosing the right master, it dysplays the 3 :

@if(Auth::user()->role_id == 1 ) @extends('layout.masterPilote') @elseif(Auth::user()->role_id == 4 ) @extends('layout.master') @elseif(Auth::user()->role_id == 5 ) @extends('layout.masterOpoci') @endif

Do you guys know why ? Thx for your reply

Please sign in or create an account to participate in this conversation.