Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return static::active()
- ->whereHas('agents',
- function ($query) use($list) {
- $query->whereIn('appointmentable_id', $list)->where('appointmentable_type', 'App\Agent');
- })
- ->orWhereHas('prospectings',
- function ($query) use($pros) {
- $query->whereIn('appointmentable_id', $pros)->where('appointmentable_type', 'App\Prospecting');
- })->where('event_id', $event->id)->where('starts_at_date', 'LIKE', "{$year}%")->get();
Add Comment
Please, Sign In to add comment