Walidacja e -mail w Laravel
'email' => 'required|email|unique:users,email',
//@sujay
$uj@y
'email' => 'required|email|unique:users,email',
//@sujay
@if ($errors->any())
@foreach ($errors->all() as $error)
<div>{{$error}}</div>
@endforeach
@endif
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
Validator::make($data, [
'email' => [
'required',
Rule::unique('users')->ignore($user->id),
],
]);
'required|email|unique:company_users,email_address,NULL,id,company_id,' . $request->company_id