public function search()
    {
        if (request()->get('query') == "") {
            return $this->reset();
        }
        
        session()->put($this->getSearchableKey(), request()->get('query'));

        if (request()->redirectUri) {
            return redirect()->to(request()->redirectUri);
        }

        return redirect()->to($this->previousUrl());
    }
public function search()
    {
        if (request()->get('query') == "") {
            return $this->reset();
        }
        
        session()->put($this->getSearchableKey(), request()->get('query'));

        if (request()->redirectUri) {
            return redirect()->to(request()->redirectUri);
        }

        return redirect()->to($this->previousUrl());
    }
public function search ( ) { if ( request ( ) -> get ( 'query' ) == "" ) { return $ this -> reset ( ) ; } session ( ) -> put ( $ this -> getSearchableKey ( ) , request ( ) -> get ( 'query' ) ) ; if ( request ( ) -> redirectUri ) { return redirect ( ) -> to ( request ( ) -> redirectUri ) ; } return redirect ( ) -> to ( $ this -> previousUrl ( ) ) ; }
Save search term to

@return mixed
Save search term to