protected function handleRequest(): void
    {
        $validator = Validator::make(
            $this->getAttribute('request')->only('rowsNumber', 'search', 'sortBy', 'sortDir'),
            [
                'rowsNumber' => 'required|numeric',
                'search'     => 'nullable|string',
                'sortBy'     => 'nullable|string|in:' . $this->getAttribute('columns')->implode('attribute', ','),
                'sortDir'    => 'nullable|string|in:asc,desc',
            ]
        );
        if ($validator->fails()) {
            $this->getAttribute('request')->merge([
                'rowsNumber' => $this->getAttribute('rowsNumber')
                    ? $this->getAttribute('rowsNumber')
                    : config('tablelist.value.rows_number'),
                'search'     => null,
                'sortBy'     => $this->getAttribute('sortBy'),
                'sortDir'    => $this->getAttribute('sortDir'),
            ]);
        } else {
            $this->setAttribute('rowsNumber', $this->getAttribute('request')->rowsNumber);
            $this->setAttribute('search', $this->getAttribute('request')->search);
        }
    }
protected function handleRequest(): void
    {
        $validator = Validator::make(
            $this->getAttribute('request')->only('rowsNumber', 'search', 'sortBy', 'sortDir'),
            [
                'rowsNumber' => 'required|numeric',
                'search'     => 'nullable|string',
                'sortBy'     => 'nullable|string|in:' . $this->getAttribute('columns')->implode('attribute', ','),
                'sortDir'    => 'nullable|string|in:asc,desc',
            ]
        );
        if ($validator->fails()) {
            $this->getAttribute('request')->merge([
                'rowsNumber' => $this->getAttribute('rowsNumber')
                    ? $this->getAttribute('rowsNumber')
                    : config('tablelist.value.rows_number'),
                'search'     => null,
                'sortBy'     => $this->getAttribute('sortBy'),
                'sortDir'    => $this->getAttribute('sortDir'),
            ]);
        } else {
            $this->setAttribute('rowsNumber', $this->getAttribute('request')->rowsNumber);
            $this->setAttribute('search', $this->getAttribute('request')->search);
        }
    }
protected function handleRequest ( ) : void { $ validator = Validator :: make ( $ this -> getAttribute ( 'request' ) -> only ( 'rowsNumber' , 'search' , 'sortBy' , 'sortDir' ) , [ 'rowsNumber' => 'required|numeric' , 'search' => 'nullable|string' , 'sortBy' => 'nullable|string|in:' . $ this -> getAttribute ( 'columns' ) -> implode ( 'attribute' , ',' ) , 'sortDir' => 'nullable|string|in:asc,desc' , ] ) ; if ( $ validator -> fails ( ) ) { $ this -> getAttribute ( 'request' ) -> merge ( [ 'rowsNumber' => $ this -> getAttribute ( 'rowsNumber' ) ? $ this -> getAttribute ( 'rowsNumber' ) : config ( 'tablelist.value.rows_number' ) , 'search' => null , 'sortBy' => $ this -> getAttribute ( 'sortBy' ) , 'sortDir' => $ this -> getAttribute ( 'sortDir' ) , ] ) ; } else { $ this -> setAttribute ( 'rowsNumber' , $ this -> getAttribute ( 'request' ) -> rowsNumber ) ; $ this -> setAttribute ( 'search' , $ this -> getAttribute ( 'request' ) -> search ) ; } }
Handle the request treatments.

@return void
Handle the request treatments .