validation laravel api code example
Example 1: laravel image validation
'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
Example 2: form validation with larvel api
use Illuminate\Support\Facades\Validator;
$validator = Validator::make($request->all(), [
'photos.profile' => 'required|image',
]);
Example 3: laravel validation
Rule::unique('users')->ignore($user)