Guest User

Untitled

a guest
Oct 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. return static::active()
  2. ->whereHas('agents',
  3. function ($query) use($list) {
  4. $query->whereIn('appointmentable_id', $list)->where('appointmentable_type', 'App\Agent');
  5. })
  6. ->orWhereHas('prospectings',
  7. function ($query) use($pros) {
  8. $query->whereIn('appointmentable_id', $pros)->where('appointmentable_type', 'App\Prospecting');
  9. })->where('event_id', $event->id)->where('starts_at_date', 'LIKE', "{$year}%")->get();
Add Comment
Please, Sign In to add comment