-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from TomHAnderson/feature/readme
readme
- Loading branch information
Showing
2 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,32 @@ | ||
# API Problem for Laravel | ||
|
||
[![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) | ||
[![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) | ||
[![PHP Version](https://img.shields.io/badge/PHP-8.0%2b-blue)](https://img.shields.io/badge/PHP-8.0%2b-blue) | ||
[![Total Downloads](https://poser.pugx.org/api-skeletons/laravel-api-problem/downloads)](//packagist.org/packages/api-skeletons/laravel-api-problem) | ||
[![License](https://poser.pugx.org/api-skeletons/laravel-api-problem/license)](//packagist.org/packages/api-skeletons/laravel-api-problem) | ||
|
||
This repository implements [RFC 7807](https://www.rfc-editor.org/rfc/rfc7807.html) | ||
"Problem Details for HTTP APIs" | ||
"Problem Details for HTTP APIs" for Laravel. | ||
|
||
## Installation | ||
|
||
Run the following to install this library using [Composer](https://getcomposer.org/): | ||
|
||
```bash | ||
composer require api-skeletons/laravel-api-problem | ||
``` | ||
|
||
## Quick Start | ||
|
||
```php | ||
use ApiSkeletons\Laravel\ApiProblem\Facades\ApiProblem; | ||
|
||
return ApiProblem::response(401, 'Detailed Unauthorized Message'); | ||
``` | ||
|
||
## Attribution | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters