I was wondering if it is possible to define different data for item resource and collection resource.
For collection I only want to send [\'id\', \'title\', \
[\'id\', \'title\', \
The accepted answer works, if you are not interested in using links and meta data. If you want, simply return:
return new PageResourceCollection(Page::paginate(10));
in your controller. You should also look to eager load other dependent relationships before passing over to the resource collection.