File tree 2 files changed +28
-2
lines changed
2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 1
1
# API Problem for Laravel
2
2
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
+
3
9
This 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
+ ```
5
27
28
+ ## Attribution
6
29
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 47
47
"require" : {
48
48
"php" : " ^8.0" ,
49
49
"doctrine/instantiator" : " ^1.4" ,
50
- "laravel/framework" : " ^8.80 "
50
+ "laravel/framework" : " ^8.0||^9.0 "
51
51
},
52
52
"require-dev" : {
53
53
"doctrine/coding-standard" : " ^9.0" ,
You can’t perform that action at this time.
0 commit comments