Merge remote-tracking branch 'origin/master'

This commit is contained in:
omair saleh
2021-04-21 16:52:36 +08:00
37 changed files with 86746 additions and 50 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ class CompanyResource extends JsonResource
'business_type' => (int) $this->business_type,
'status' => (int) $this->status,
'contact' => new ContactResource ($this->when($this->has('contacts'), $this->contacts->first())),
'address' => new AddressResource($this->when($this->has('addresses'), $this->addresses->first())),
'address' => new AddressResource($this->when($this->has('addresses'), $this->addresses->where('billing', true)->first())),
'employee' => new UserResource($this->employees->first()),
'identification' => new DocumentResource($this->documents->whereIn('document_type', DocumentType::IDENTIFICATION_DOCUMENTS)->first()),
'bookings' => BookingResource::collection($this->whenLoaded('bookings', $this->bookings()->orderBy('id', 'DESC')->get(), [])),