🔁Update Request
this method returns RedirectResponse or JsonResponse based on the request type. and we get the request type by check if the route has splade
middleware or not.
this method accept some arguments:
request
the request objectmodel
the model you want to getvalidation
the validation rules you want to usemessage
the message you want to return with the responsevalidationError
the message you want to return if the validation failedredirect
the redirect route you want to redirect tohasMedia
if you want to get the media of the model or notcollection [array]
the media collection you want to get as array take true if it's multi or false if it's singleapi
if you want to return JsonResponse or not
Last updated