Download the PHP package sarav/descriptive-api without Composer
On this page you can find all versions of the php package sarav/descriptive-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download sarav/descriptive-api
More information about sarav/descriptive-api
Files in sarav/descriptive-api
Download sarav/descriptive-api
More information about sarav/descriptive-api
Files in sarav/descriptive-api
Vendor sarav
Package descriptive-api
Short Description A Simple Laravel Package providing descriptive API methods
License MIT
Package descriptive-api
Short Description A Simple Laravel Package providing descriptive API methods
License MIT
Please rate this library. Is it a good library?
Informations about the package descriptive-api
Laravel : Descriptive API methods
A Simple Laravel Package providing descriptive API methods
- Laravel: 9.0.*
- Author: Sarav
- Author Homepage: http://sarav.co
Install Composer package
Open your terminal and navigate to your laravel folder. Now run the following command
composer require sarav/descriptive-api
That's all is required for the package setup.
Usage
Following are the list of available methods
Methods | Status Code | Default Message |
---|---|---|
ok() |
200 | |
created() |
201 | |
noContent() |
204 | |
badRequest() |
400 | Invalid Request |
unauthorized() |
401 | User unauthorized |
forbidden() |
403 | Access denied |
notFound() |
404 | Resource not found |
validationFailure() |
422 | Validation failure |
internalServerError() |
500 | Internal Server Error |
Now you can start using the methods as follows
ok()
created
noContent
badRequest
unauthorized
forbidden
notFound
validationFailure()
internalServerError()
Overriding Default Messages
If you wish to override the default message, then simply provide your default message as param. That's it.
For example,
For more information check out this article.
All versions of descriptive-api with dependencies
PHP Build Version
Package Version
The package sarav/descriptive-api contains the following files
Loading the files please wait ....