*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'full_name' => $this->full_name, 'username' => $this->username, 'gender' => $this->gender, 'email' => $this->email, 'phone_number' => $this->phone_number, 'avatar' => $this->avatar, 'national_id' => $this->national_id, 'position' => $this->position, 'province_id' => $this->province_id, 'province_name' => $this->province_name, 'role' => $this->roles->pluck('id', 'name_fa'), 'permissions' => $this->getPermissionNames(), 'telephone_id' => $this->telephone_id, 'server_province_id' => config('ProvinceInfo.id'), ]; } }