Laravel eloquent where error with <>

前端 未结 3 2378
栀梦
栀梦 2021-02-20 03:02

I have query for where in native php

where type <> \'point\'

and I try convert to eloquent laravel<

3条回答
  •  無奈伤痛
    2021-02-20 03:42

    If that is all you need to do with the query then you can just chain it like this:

    ->with('payments')->where('type', '<>', 'point') //chain more after this
    

    Correct answer should be this if you are trying to filter payments where the type is not equal to point.

提交回复
热议问题