This repository implements RFC 7807 "Problem Details for HTTP APIs" for Laravel.
Run the following to install this library using Composer:
composer require api-skeletons/laravel-api-problem
use ApiSkeletons\Laravel\ApiProblem\Facades\ApiProblem;
return ApiProblem::response(401, 'Detailed Unauthorized Message');
The bulk of this repository was copied from Laminas API Tools. I wanted to provide a simplified interface specific to Laravel. Though the tool could have been used directly from the Laminas library it would have come with a lot of overhead. Thanks Laminas.