You cannot resolve a resource from the container. It needs to be instantiated with an Eloquent model as a dependency. You need to use it with a collection like this:
$result = $this->model->all(); return Resource::collection($result);
Please read the docs carefully: https://laravel.com/docs/9.x/eloquent-resources
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us