src/Dtos/Legacy/Requests/UserFilters.php line 7

Open in your IDE?
  1. <?php
  2. namespace App\Dtos\Legacy\Requests;
  3. class UserFilters extends ListDto
  4. {
  5.     public function __construct(
  6.         int $page 1,
  7.         int $perPage 10,
  8.         private int $societyId,
  9.         private ?string $search ''
  10.     ) {
  11.         parent::__construct($page$perPage);
  12.     }
  13.     public function getSocietyId(): ?int
  14.     {
  15.         return $this->societyId;
  16.     }
  17.     public function setSocietyId(int $societyId): void
  18.     {
  19.         $this->societyId $societyId;
  20.     }
  21.     public function getSearch(): string
  22.     {
  23.         return $this->search;
  24.     }
  25.     public function setSearch(string $search): void
  26.     {
  27.         $this->search $search;
  28.     }
  29.     public function toArray(): array
  30.     {
  31.         return [
  32.             'page' => $this->getPage(),
  33.             'per_page' => $this->getPerPage(),
  34.             'society_id' => $this->getSocietyId(),
  35.             'search' => $this->getSearch(),
  36.         ];
  37.     }
  38. }