shing_shing
3 months ago
625
2
Laravel

@extends condition which @extends directory to be used

Posted 3 months ago by shing_shing

@if(auth()->user()->type == '1')

@extends('teacher.layouts.app')

@elseif(auth()->user()->type == '2')

@extends('principalsportal.layouts.app')

@elseif(auth()->user()->type == '3')

@extends('registrar.layouts.app')

@elseif(auth()->user()->type == '4')

@extends('finance.layouts.app') 

@endif

@section('content')

@endsection

The problem is, all the @section of all the @extends I conditioned at the top are displaying.

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