get unique values in laravel
$users = User::select('name')->distinct()->get();
get unique values in laravel
$users = User::select('name')->distinct()->get();
laravel collection unique
$collection = collect([1, 1, 2, 2, 3, 4, 2]);
$unique = $collection->unique();
$unique->values()->all();
// [1, 2, 3, 4]
laravel rule unique where
'required|email|unique:company_users,email_address,NULL,id,company_id,' . $request->company_id
laravel collection unique
$users = $users->unique();
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us