| 1234567891011121314151617181920212223 |
- <?php
- namespace App\Http\Resources;
- use Illuminate\Http\Request;
- use Illuminate\Http\Resources\Json\JsonResource;
- class FranchiseeContractTaxHistoryResource extends JsonResource
- {
- public function toArray(Request $request): array
- {
- return [
- 'id' => $this->id,
- 'inhabitant_classification_id' => $this->inhabitant_classification_id,
- 'inhabitant_classification' => $this->whenLoaded('inhabitantClassification', fn() => $this->inhabitantClassification?->description),
- 'tbr_fixed_value' => $this->tbr_fixed_value,
- 'tbr_fixed_value_percentage' => $this->tbr_fixed_value_percentage,
- 'marketing_fund_percentage' => $this->marketing_fund_percentage,
- 'maintance_tax_percentage' => $this->maintance_tax_percentage,
- 'created_at' => $this->created_at?->format('Y-m-d H:i:s'),
- ];
- }
- }
|