| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 | <?php/** * Created by PhpStorm. * User: wuzhenke * Date: 2018/11/9 * Time: 15:40 */namespace App\Repositories;use App\Models\JobsContact;use Prettus\Repository\Criteria\RequestCriteria;use Prettus\Repository\Eloquent\BaseRepository;class JobsContactRepository extends BaseRepository{    public function model()    {        return JobsContact::class;    }    /**     * Boot up the repository, pushing criteria     */    public function boot()    {        $this->pushCriteria(app(RequestCriteria::class));    }    public function store($data)    {        return $this->model->create($data);    }    public function update(array $data, $id)    {        return $this->model->where('job_id', $id)->update($data);    }    public function getContactInfo($where)    {        return $this->model->where($where)->first();    }    public function delJobsContact($jobs_id)    {        return $this->model->whereIn('job_id', $jobs_id)->delete();    }}
 |