src/Repositories/Search.php
public function apply($model, Repository $repository)
    {
        if (isset($this->search['name'])) {
            $model = $model->where('name', 'like', "%{$this->search['name']}%");
        }

        return $model;
    }
public function apply($model, Repository $repository)
    {
        if (isset($this->search['name'])) {
            $model = $model->where('name', 'like', "%{$this->search['name']}%");
        }

        return $model;
    }
@param  Model|Builder $model
@param Repository     $repository

@return mixed