$this->id, 'protocol' => $this->protocol, 'student_id' => $this->student_id, 'unit_id' => $this->unit_id, 'class_package_unit_id' => $this->class_package_unit_id, 'signature_date' => $this->signature_date ? Carbon::parse($this->signature_date)->format('d/m/Y') : null, 'end_date' => $this->end_date ? Carbon::parse($this->end_date)->format('d/m/Y') : null, 'class_quantity' => $this->class_quantity, 'weekday' => $this->weekday, 'start_time' => $this->start_time, 'end_time' => $this->end_time, 'second_weekday' => $this->second_weekday, 'second_start_time' => $this->second_start_time, 'second_end_time' => $this->second_end_time, 'due_date' => $this->due_date ? Carbon::parse($this->due_date)->format('d/m/Y') : null, 'recurring_day' => $this->recurring_day, 'tax_register' => $this->tax_register, 'down_payment' => $this->down_payment, 'installments' => $this->installments, 'early_payment_discount' => $this->early_payment_discount, 'material_value' => $this->material_value, 'material_installments' => $this->material_installments, 'interest_rate' => $this->interest_rate, 'payment_method' => $this->payment_method, 'fine_cancelled' => $this->fine_cancelled, 'status' => $this->status, 'file_url' => $this->file_url ? Storage::url($this->file_url) : null, 'file_type' => $this->file_type, '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); } }