@php $allActive = []; parse_str($reqData, $output); @endphp @foreach ($output['entities'] as $entityId) @php $getTitle = DB::connection('mysql_site_' . session('serverID')) ->table('pages') ->where('id', '=', $entityId) ->where('site_id', '=', session('siteID')) ->get() ->first(); @endphp @if ($getTitle) @php $allActive[] = $getTitle->id; @endphp
{{ $getTitle->title }}
@endif @endforeach
< >
@php $getTitleHide = DB::connection('mysql_site_' . session('serverID')) ->table('pages') ->whereNotIn('id', $allActive) ->where('site_id', '=', session('siteID')) ->get(); @endphp @foreach ($getTitleHide as $itemHide)
{{ $itemHide->title }}
@endforeach