select('ts.title as status, tt.title as type, t.receipt_date, tl.issue_date, t.id as tmc') ->from(Tmc::tableName() . ' t') ->leftJoin(TmcType::tableName() . ' tt', 'tt.id = t.tmc_type') ->leftJoin(TmcStatus::tableName() . ' ts', 'ts.id = t.status') ->leftJoin(UserDevice::tableName() . ' tud', 'tud.employee = t.employee') ->leftJoin(Log::tableName() . ' tl', 'tl.id = tud.camera or tl.id = tud.oil_meter or tl.id = tud.phone') ->where(['t.employee' => $user->id]) ->groupBy('t.id') ; $devices = $query->all(); ?>
= $device['type'] ?> |
|
ID | = $device['tmc'] ?> |
Статус | = $device['status'] ?> |
Дата выдачи | = $device['issue_date'] ?> |