*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'student_id' => $this->student_id, 'name' => $this->name, 'birth_date' => $this->birth_date?->format('Y-m-d'), 'cpf' => $this->cpf, 'gender' => $this->gender, 'degree' => $this->degree, 'email' => $this->email, 'phone' => $this->phone, 'street' => $this->street, 'address_number' => $this->address_number, 'postal_code' => $this->postal_code, 'neighborhood' => $this->neighborhood, 'city_id' => $this->city_id, 'state_id' => $this->state_id, 'complement' => $this->complement, 'notes' => $this->notes, '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); } }