mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 04:23:59 +00:00
large commit
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\AccountStatus;
|
||||
use App\Models\CompanyConnections;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class CompanyResource extends JsonResource
|
||||
@@ -18,10 +19,12 @@ class CompanyResource extends JsonResource
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'account_no' => $this->reference_no,
|
||||
'marking' => CompanyConnections::where('module_one', $this->modules->first()->id)->first()->marking,
|
||||
'name' => $this->name,
|
||||
'type' => $this->type,
|
||||
'status' => AccountStatus::STATUS[$this->status],
|
||||
'delivery_address' => new AddressResource($this->deliveryAddress)
|
||||
'delivery_address' => new AddressResource($this->deliveryAddress),
|
||||
'contact' => new ContactResource($this->contacts->first())
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user