mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
Add address to create order resources
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Resources;
|
||||
|
||||
|
||||
use App\Models\Company;
|
||||
use App\Models\Address;
|
||||
use App\Models\Currency;
|
||||
use App\Models\OrderStep;
|
||||
use App\Models\SegmentConstant;
|
||||
@@ -27,6 +28,7 @@ class OrderResource extends JsonResource
|
||||
'status' => (int) $this->status,
|
||||
'current_step' => $this->current_step,
|
||||
'company' => new CompanyResource(Company::where('id',$this->companyModule()->first()->company_id)->first()),
|
||||
'address' => new AddressResource($this->when($this->has('addresses'), $this->addresses->where('owner_id', $this->id)->first())),
|
||||
'order_steps' => OrderStepsResource::collection($this->orderSteps()->get()),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user