Filtering Relationship: Column 'price' in where clause is ambiguous #441
Unanswered
BenOussama180
asked this question in
Q&A
Replies: 1 comment
-
Did you get this to work? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Data Source :
public function datasource(): ?Builder { return Order::query() ->join('links', function ($links) { $links->on('orders.link_id', '=', 'links.id'); }) ->select([ 'orders.*', 'links.live_url as live_url', ]); }
relationSearch :
public function relationSearch(): array { return [ 'link' => [ 'live_url', // i dont know what to put here to stop it from being ambiguous while fileting by price :( ], ]; }
basically i have column price in both Order and Link model , having relationship link() in Order Modal, i did check the docs for filtering by relationship i dont think i really undrestood, what should i put in relationSearch function to filter only by Order's price
Beta Was this translation helpful? Give feedback.
All reactions