Download the PHP package ypa/abstract-api without Composer
On this page you can find all versions of the php package ypa/abstract-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download ypa/abstract-api
More information about ypa/abstract-api
Files in ypa/abstract-api
Download ypa/abstract-api
More information about ypa/abstract-api
Files in ypa/abstract-api
Vendor ypa
Package abstract-api
Short Description Abstract package for extra security in API's
License MIT
Package abstract-api
Short Description Abstract package for extra security in API's
License MIT
Please rate this library. Is it a good library?
Informations about the package abstract-api
Laravel & Lumen Abstract API Security
Laravel
-
Add the Service Provider to
config/app.php
- Run
php artisan vendor:publish
to publish the config file; - Add the
.env
variables and their values; -
Add the middleware in
App\Http\Kernel.php
to$routeMiddleware
-
And i advice to add it to the
api
group in the same file: - For sending you can add the
AbstractApiValidationTrait
to your controller. - Right before your API request you can use the following method:
That's it!
Lumen
-
Add the
.env
variables and their values; -
Add the middleware in your bootstrap file.
- Add the middleware to your routes you want to secure like any other middleware in Lumen.
- For sending you can add the
AbstractApiValidationTrait
to your controller. - Right before your API request you can use the following method:
That's it!
All versions of abstract-api with dependencies
PHP Build Version
Package Version
Requires
nesbot/carbon Version
^2.26
The package ypa/abstract-api contains the following files
Loading the files please wait ....