Level 6
have you tried whereHas()? https://laravel.com/docs/5.4/eloquent-relationships#querying-relationship-existence
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have been scratching my head with this all day.
I have 3 tables, brands, bids and quotes. Each quote has an urgency_time needed. Each bid has a lead_time to ship and a price.
I need to get the bid that has a lead_time that is equal to or lower than the quotes urgency_time. If there is not a lead_time that is equal or lower to the quotes urgency_time than I need to get the next lead_time that is greater or equal to the quotes urgency_time.
Please or to participate in this conversation.