Cant understand Eloquent distinct

Posted 1 year ago by alexMafus

Hi i have a function that filter my users and now i want to show me unique users by first name but when i use this code show me only the first name how to filter unique users by first name and to show all of user data here is my code

 })->when($search_status, function ($query) use ($search_status) {
            return $query->select('first_name')->distinct();

Please sign in or create an account to participate in this conversation.