cloudcreativity / laravel-json-api

JSON API (jsonapi.org) package for Laravel applications.
http://laravel-json-api.readthedocs.io/en/latest/
Apache License 2.0
778 stars 109 forks source link

use Errors Handling in Laravel 8 #625

Open matupaarela opened 2 years ago

matupaarela commented 2 years ago

How to format the exceptions correctly in laravel 8, since in this version there is no longer the render method, there is the register method but it does not receive the $ request parameter

lindyhopchris commented 2 years ago

The render method does still exist, so if you follow the installation instructions you will still get JSON:API errors. We maybe need to update it at some point as Laravel has changed how you can plug into the exception handler. However this isn't a high priority as it still works using the render method, and this package is technically deprecated in favour of the new laravel-json-api/laravel package.

I'd recommend that if you are starting out on a new project, you install the new package instead