*/ public function all($keys = null): array { $request = parent::all($keys); $request['page'] = $this->route('page'); return $request; } public function authorize(): bool { return true; } /** * @return array */ public function rules(): array { return [ 'page' => 'required|integer|min:1', ... $this->postFilter->validateRules(), ... $this->postOrder->validateRules() ]; } /** * @return array */ public function attributes(): array { return [ 'page' => 'page number', ]; } public function filters(): ?PostFilterDTO { return $this->postFilter->makeFromRequest($this); } public function order(): ?PostOrderDTO { return $this->postOrder->makeFromRequest($this); } }