Skip to content

Commit f2190df

Browse files
authored
Merge pull request #1 from TomHAnderson/feature/readme
readme
2 parents 5c19f5d + 52d29f7 commit f2190df

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

README.md

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
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+
39
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+
```
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.

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
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",

0 commit comments

Comments
 (0)