Randy_Johnson
3 months ago
137
1
General

Blade Laravel - Two yields in the same view.

Posted 3 months ago by Randy_Johnson

I am trying to do something as shown below.

@extends('layouts.app')
 
@section('content')

@if(auth()->user()->is_admin == 1)
    @yield('content', View::make('view.admin'))
@else
    @yield('content', View::make('view.user'))
@endif

@endsection

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