@foreach($sidebar as $item) @if($item->type == 1) @if($item->page_title) {{$item->page_title}} @endif @endif @if($item->type == 2) @endif @if($item->type == 3) @endif @if($item->type == 4) @endif @endforeach