entity){ 'invoices' => $data = $el->checkInvoice($request->getEntity()), 'clients' => $data = $el->checkClient($request->getEntity()), 'companies' => $data = $el->checkCompany($request->getEntity()), default => $data['passes'] = false, }; nlog($data); return response()->json($data, $data['passes'] ? 200 : 400); } }