This might be quite easy but have no idea how to.
I have a table that can have repeated values for a particular non-key column field. How do I write a SQL query usin
// Get unique value for table 'add_new_videos' column name 'project_id' $project_id = DB::table('add_new_videos')->distinct()->get(['project_id']);
$users = User::all(); foreach($users->unique('column_name') as $user){ code here.. }