$this->id, 'name' => $this->name, 'state_id' => $this->state_id, 'country_id' => $this->country_id, 'state' => $this->state, 'country' => $this->country, 'status' => $this->status, 'created_at' => Carbon::parse($this->created_at)->format('Y-m-d H:i:s'), 'updated_at' => Carbon::parse($this->updated_at)->format('Y-m-d H:i:s'), ]; } /** * @param \Illuminate\Database\Eloquent\Collection $resource * @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection */ public static function collection($resource): AnonymousResourceCollection { return parent::collection($resource); } }