how to get unique data from database using eloquent model (laravel)
here is my code - $list = Plot::active() ->whereNotNull('user_id') ->distinct('user_id') ->with('user') ->paginate(10); but here "distinct('user_id')" not working. I want only unique user_id.