mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 04:23:59 +00:00
big commit
This commit is contained in:
@@ -18,11 +18,12 @@ class CompanyResource extends JsonResource
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
$companyModule = $this->modules->first();
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'account_no' => $this->reference_no,
|
||||
'marking' => CompanyConnections::where('module_one', $this->modules->first()->id)->first()->marking,
|
||||
'email' => $this->employees->first()->email,
|
||||
'marking' => CompanyConnections::where('module_one', $companyModule->id)->first()->marking,
|
||||
'email' => $companyModule->employees->first()->email,
|
||||
'name' => $this->name,
|
||||
'type' => $this->type,
|
||||
'status' => (int) $this->status,
|
||||
|
||||
Reference in New Issue
Block a user