feat: consolidar desenvolvimentos do portal InvestMoz
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Services\ExistingBusinessClassification;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
@@ -24,6 +25,10 @@ class PublicBusinessOpportunityResource extends JsonResource
|
||||
'amount_max' => data_get($this->resource, 'amount_max'),
|
||||
'available_percentage' => data_get($this->resource, 'available_percentage'),
|
||||
'published_at' => data_get($this->resource, 'published_at'),
|
||||
'distance_km' => $this->resource->getAttribute('distance_km') !== null ? round((float) $this->resource->getAttribute('distance_km'), 1) : null,
|
||||
'location_recorded_at' => $this->resource->getAttribute('location_recorded_at') ? CarbonImmutable::parse($this->resource->getAttribute('location_recorded_at'))->toIso8601String() : null,
|
||||
'location_source_reference' => $this->resource->getAttribute('location_source_reference'),
|
||||
'location_source_date' => $this->resource->getAttribute('location_source_date'),
|
||||
'sector' => $this->whenLoaded('sector', fn () => data_get($this->resource, 'sector')?->only(['name', 'slug'])),
|
||||
'province' => $this->resource->getAttribute('province'),
|
||||
'district' => $this->resource->getAttribute('district'),
|
||||
|
||||
Reference in New Issue
Block a user