๐Get Request
this method returns view 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:
model
the model you want to getview
the view you want to returndata
the data you want to pass to the viewhasMedia
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 singleattach [array]
to attach some data to the modelapi
if you want to return JsonResponse or notresource
resource class to resource your returned dataquery
if you want to add some query to the model
Last updated