*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'unique_id' => $this->unique_id, 'card_type_id' => $this->cardType?->name, 'card_number' => $this->card_number, 'card_month' => $this->card_month, 'card_year' => $this->card_year, 'region' => RegionRepo::label($this->region), 'branch_id' => $this->branch?->name, 'customer_name' => $this->customer_name, 'customer_surname' => $this->customer_surname, 'customer_patronic_name' => $this->customer_patronic_name, 'born_at' => $this->born_at, 'phone' => $this->phone, 'passport_serie' => $this->passport_serie, 'passport_id' => $this->passport_id, 'passport_one' => url('/storage/'.$this->passport_one), 'passport_two' => url('/storage/'.$this->passport_two), 'passport_three' => url('/storage/'.$this->passport_three), 'passport_four' => url('/storage/'.$this->passport_four), 'notes' => $this->notes, 'user_id' => $this->user_id, 'status' => OrderRepo::statusFormatted($this->status), 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, ]; } }