protected function parseRequest(array $request) : array
    {
        $request = Collection::make($request);

        $allowed = $request->filter(function ($item) { return trim($item) != ''; })->only(array_keys($this->allowed));

        if ($filterable = $this->allowedFeatures($request)) {
            $allowed['features'] = $filterable;
        }

        return $allowed->all();
    }
protected function parseRequest(array $request) : array
    {
        $request = Collection::make($request);

        $allowed = $request->filter(function ($item) { return trim($item) != ''; })->only(array_keys($this->allowed));

        if ($filterable = $this->allowedFeatures($request)) {
            $allowed['features'] = $filterable;
        }

        return $allowed->all();
    }
protected function parseRequest ( array $ request ) : array { $ request = Collection :: make ( $ request ) ; $ allowed = $ request -> filter ( function ( $ item ) { return trim ( $ item ) != '' ; } ) -> only ( array_keys ( $ this -> allowed ) ) ; if ( $ filterable = $ this -> allowedFeatures ( $ request ) ) { $ allowed [ 'features' ] = $ filterable ; } return $ allowed -> all ( ) ; }
Parses the incoming request.

@param array $request

@return array
Parses the incoming request .