Skip to content

Commit

Permalink
Merge pull request #1 from TomHAnderson/feature/readme
Browse files Browse the repository at this point in the history
readme
  • Loading branch information
TomHAnderson authored Jan 20, 2022
2 parents 5c19f5d + 52d29f7 commit f2190df
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
28 changes: 27 additions & 1 deletion README.md
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.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"require": {
"php": "^8.0",
"doctrine/instantiator": "^1.4",
"laravel/framework": "^8.80"
"laravel/framework": "^8.0||^9.0"
},
"require-dev": {
"doctrine/coding-standard": "^9.0",
Expand Down

0 comments on commit f2190df

Please sign in to comment.