laravel make validator code example
Example 1: image validate in laravel validater
$this->validate($request, ['file' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',]);
Example 2: validate field for existing client laravel
unique:users,username,id,1 // table, field, idcolumn, value to ignore
Example 3: laravel validation
Rule::unique('users')->ignore($user->id, 'user_id')