@if(Auth::guard('admin')->check()) Select Sub Category @foreach($cat->subs as $sub) {{ $sub->name }} @endforeach @else Select Sub Category @foreach($cat->subs as $sub) {{ $sub->name }} @endforeach @endif