Eloquent Relationship Count Constraint

I am trying to write an eloquent query that would work as follows:

Tables:
Order
Support Ticket (one to many with the order)

Query: Filter the support tickets and only show the order if the support ticket is less than 45 days old.

I feel like this would be an adaptation of the whereHas() method in Laravel but I am not sure how to implement a filter or a date search on a relationship like this.

Thanks!



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/37r81bt
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

I am unable to figure out how to create payment collection request, after a form has been submitted in laravel

laravel, mysql transaction not working after failed one time