here is my code -
Код: Выделить всё
$list = Plot::active() ->whereNotNull('user_id') ->distinct('user_id') ->with('user') ->paginate(10);
Источник: https://stackoverflow.com/questions/781 ... el-laravel