AH
$complexes = ResidentialComplexes::where('discount_title', '<>', NULL)
->inRandomOrder()
->take(4)
->get();
Как прописать min() чтобы выводило по условиям но в объекте ->price выводилась наименьшая цена из всех?
$complexes = ResidentialComplexes::whereNotNull('discount_title')
->inRandomOrder()
->take(4)
->get();
$min = $complexes->min('price');
https://laravel.com/docs/6.x/collections#method-min