big commit

This commit is contained in:
omair saleh
2021-03-22 08:46:33 +08:00
parent 307aff1c3f
commit 9fe0757baf
75 changed files with 2587 additions and 425 deletions
+4 -2
View File
@@ -3,6 +3,7 @@
namespace App\Http\Resources;
use App\Classes\ValueObjects\Constants\AccountStatus;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Models\CompanyConnections;
use Illuminate\Http\Resources\Json\JsonResource;
@@ -22,9 +23,10 @@ class CompanyResource extends JsonResource
'marking' => CompanyConnections::where('module_one', $this->modules->first()->id)->first()->marking,
'name' => $this->name,
'type' => $this->type,
'status' => AccountStatus::STATUS[$this->status],
'status' => $this->status,
'delivery_address' => new AddressResource($this->deliveryAddress),
'contact' => new ContactResource($this->contacts->first())
'contact' => new ContactResource($this->contacts->first()),
'total_orders' => count($this->orders)
];
}
}