Предложение Laravel multiple where в предложении WHERE ограничивает отношения hasMany
#mysql #laravel #eloquent Вопрос: У меня есть следующий вопрос... $pgcs = PrivateGuard::with(['licences', 'state']) ->whereHas('licences', function($query){ $query->whereDate('expiration_of_licence', '<', Carbon::today()) ->where('renewal', 0); }) ->where('status', 1) ->get(); Я хочу получить $pgcs с лицензиями,…