public function searchable(array $attributes, string $key = 'q'): void
    {
        $model = $this->resolveQueryBuilderFromModel($this->model);
        $request = $this->app->make('request');
        $value = $request->input($key);

        $request->merge(["{$key}" => \rawurlencode($value)]);

        $this->set('search', [
            'attributes' => $attributes,
            'key' => $key,
            'value' => $value,
        ]);

        $this->model = $this->setupWildcardQueryFilter($model, $value, $attributes);
    }
public function searchable(array $attributes, string $key = 'q'): void
    {
        $model = $this->resolveQueryBuilderFromModel($this->model);
        $request = $this->app->make('request');
        $value = $request->input($key);

        $request->merge(["{$key}" => \rawurlencode($value)]);

        $this->set('search', [
            'attributes' => $attributes,
            'key' => $key,
            'value' => $value,
        ]);

        $this->model = $this->setupWildcardQueryFilter($model, $value, $attributes);
    }
public function searchable ( array $ attributes , string $ key = 'q' ) : void { $ model = $ this -> resolveQueryBuilderFromModel ( $ this -> model ) ; $ request = $ this -> app -> make ( 'request' ) ; $ value = $ request -> input ( $ key ) ; $ request -> merge ( [ "{$key}" => \ rawurlencode ( $ value ) ] ) ; $ this -> set ( 'search' , [ 'attributes' => $ attributes , 'key' => $ key , 'value' => $ value , ] ) ; $ this -> model = $ this -> setupWildcardQueryFilter ( $ model , $ value , $ attributes ) ; }
Execute searchable filter on model instance.

@param  array   $attributes
@param  string  $key

@return void
Execute searchable filter on model instance .