*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'description' => $this->description, 'active' => $this->active, 'created_at' => $this->created_at?->format('d/m/Y H:i'), 'updated_at' => $this->updated_at?->format('d/m/Y H:i'), ]; } /** * @param \Illuminate\Database\Eloquent\Collection $resource * @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection */ public static function collection($resource): AnonymousResourceCollection { return parent::collection($resource); } }