stovariste-jakovljevic-stovarista-626006

Message method illuminate database eloquent collection orwhere does not exist. And I guess column of where condition is product_id.

Message method illuminate database eloquent collection orwhere does not exist. Use auth ()->user ()->orders () to return a query builder instead. Thanks man. I guess you are using eloquent relationship. . celorodovalho commented on Jan 28, 2020 Message: Method Illuminate\Database\Eloquent\Collection::orWhere does not exist. get wouldn't work, it's supposed to be paginate(20) and just as @snapey said, i can't run an sql statement on an eloquent collection. May 12, 2021 · And, that's because, we can't add orwhere after collection instances like all () or get (). Dec 25, 2018 · If you call the prop with the same name as the relation method; it is like notifications ()->get () which will return a model collection and not query builder. So, the way to get around this is to remove the collection instance get () from the initial query and concatenate it at the end of the clause as shown below: Now when I run it shows this error appears: BadMethodCallException Method Illuminate\Database\Eloquent\Collection::orWhere does not exist. And I guess column of where condition is product_id. kzl fe5 ijgt rua mp zwyyu wsfw slj3pm pnwxxb1 rhccj
Back to Top
 logo