Download the PHP package rocboss/batio without Composer
On this page you can find all versions of the php package rocboss/batio. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rocboss/batio
More information about rocboss/batio
Files in rocboss/batio
Package batio
Short Description A fast and extensible micro-framework for PHP to build RESTful API.
License MIT
Homepage https://github.com/rocboss/batio
Informations about the package batio
Batio
English | 简体中文
A fast and extensible micro-framework for PHP to build RESTful API.
1. Install
Enter http://127.0.0.1:8888 in the browser's address bar. If everything is correct, you can get the following return:
Note: the initial installation needs to edit the related configuration information in the
.envfile under the project root, and you can also extend the other configuration in the file according to specific requirements.
2. Framework
2.1 Router
In app\config\routes.php, you can customize API routes.
This is an ordinary route. When you visit the home page, you directly map to the
api\HomeControllercontroller, execute the followingindexmethod, and note that the type of controller method needs to beprotected.
2.2 Middlewares
In app\config\app.php, you can customize Middleware for routes, such as authorization authentication, user roles control, etc.
Batio encapsulates a simple authentication model based on JWT, just call the auth() method after the routing of the authentication API.
The example
When you send a request, pass the
X-AuthorizationofJWTvalue to the server inheader.
2.3 Cache
2.4 Log
2.5 Database & Models
In
app\models,modelandserviceare stored,modelis mainly dealing with database. The official recommended practice is thatservicecallsmodel,controllercallsservice, so that the design makes the layering more reasonable, and the functional modules are decoupled to facilitate the business system.
Mainly depended on
Batio uses some excellent third party components, and you can get specific documents from their websites.
Authorization agreement
All versions of batio with dependencies
lcobucci/jwt Version 3.2.*
mikecao/flight Version 1.3.*
catfan/medoo Version 1.5.6
monolog/monolog Version ^1.23
doctrine/cache Version 1.4.*
vlucas/phpdotenv Version 2.0.*
predis/predis Version ^1.1
ruflin/elastica Version ^6.1
elasticsearch/elasticsearch Version ^6.0
aryelgois/medools Version 5.0.0