File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 11# API Problem for Laravel
22
3+ [ ![ Build Status] ( https://github.com/API-Skeletons/laravel-api-problem/actions/workflows/continuous-integration.yml/badge.svg )] ( https://github.com/API-Skeletons/laravel-api-problem/actions/workflows/continuous-integration.yml?query=branch%3Amain )
4+ [ ![ Code Coverage] ( https://codecov.io/gh/API-Skeletons/laravel-api-problem/branch/main/graphs/badge.svg )] ( https://codecov.io/gh/API-Skeletons/laravel-api-problem/branch/main )
5+ [ ![ PHP Version] ( https://img.shields.io/badge/PHP-8.0%2b-blue )] ( https://img.shields.io/badge/PHP-8.0%2b-blue )
6+ [ ![ Total Downloads] ( https://poser.pugx.org/api-skeletons/laravel-api-problem/downloads )] ( //packagist.org/packages/api-skeletons/laravel-api-problem )
7+ [ ![ License] ( https://poser.pugx.org/api-skeletons/laravel-api-problem/license )] ( //packagist.org/packages/api-skeletons/laravel-api-problem )
8+
39This repository implements [ RFC 7807] ( https://www.rfc-editor.org/rfc/rfc7807.html )
4- "Problem Details for HTTP APIs"
10+ "Problem Details for HTTP APIs" for Laravel.
11+
12+ ## Installation
13+
14+ Run the following to install this library using [ Composer] ( https://getcomposer.org/ ) :
15+
16+ ``` bash
17+ composer require api-skeletons/laravel-api-problem
18+ ```
19+
20+ ## Quick Start
21+
22+ ``` php
23+ use ApiSkeletons\Laravel\ApiProblem\Facades\ApiProblem;
24+
25+ return ApiProblem::response(401, 'Detailed Unauthorized Message');
26+ ```
527
28+ ## Attribution
629
30+ The bulk of this repository was copied from Laminas API Tools. I wanted to provide a
31+ simplified interface specific to Laravel. Though the tool could have been used directly
32+ from the Laminas library it would have come with a lot of overhead. Thanks Laminas.
Original file line number Diff line number Diff line change 4747 "require" : {
4848 "php" : " ^8.0" ,
4949 "doctrine/instantiator" : " ^1.4" ,
50- "laravel/framework" : " ^8.80 "
50+ "laravel/framework" : " ^8.0||^9.0 "
5151 },
5252 "require-dev" : {
5353 "doctrine/coding-standard" : " ^9.0" ,
You can’t perform that action at this time.
0 commit comments