@php $osoba = DB::table('t035_osoby') ->where('id',$osoba_id) ->first(); $dzialy = DB::table('sw020_komorki_organizacyjne') ->whereNotExists(function($query) { $query->select(DB::raw(1)) ->from('t021_pracownicy_w_dziale') ->whereRaw('t021_pracownicy_w_dziale.status = 1') ->whereRaw('sw020_komorki_organizacyjne.id = t021_pracownicy_w_dziale.dzial_id'); }) ->get(); $users = DB::table('users') ->whereNull('pracownik_id') ->where('status',1) ->get(); $navbar_id_form = $osoba->id; @endphp @extends('layouts.site') @section('content')