🔁Index 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:
request
the request objectmodel
the model you want to getview
the view you want to returntable
the table class you want to usedata
the data you want to pass to the viewapi
if you want to return JsonResponse or notresource
resource class to resource your returned dataquery
if you want to add some query to the modelfilters
if you want to add some filters to the table
Last updated