ibandominguez / restup-back
There is no license information available for the latest version (v0.4.2) of this package.
v0.4.2
2016-10-13 15:19 UTC
Requires
- php: >=5.5.0
- firebase/php-jwt: ^4.0
- ibandominguez/validator: 1.2.*
- slim/slim: ^3.5
Requires (Dev)
- guzzlehttp/guzzle: ~6.0
- phpunit/phpunit: ^5.5
This package is not auto-updated.
Last update: 2025-05-01 01:00:36 UTC
README
Build a rest api in a single file.
Use Example
<?php require __DIR__.'/../vendor/autoload.php'; use IbanDominguez\RestUp\App; App::create([ 'JWT_KEY' => 'supersecret', 'DB_HOST' => 'localhost', 'DB_NAME' => 'prueba', 'DB_USER' => 'root', 'DB_PASS' => '', ]) ->auth([ 'admin@email.com' => 'admin' ]) ->add('books', [ ['title' => 'title', 'type' => 'string', 'rules' => 'required'], ['title' => 'date', 'type' => 'date', 'rules' => 'required|date'], ]) ->add('posts', [ ['title' => 'title', 'type' => 'string', 'rules' => 'required'], ['title' => 'body', 'type' => 'string'], ['title' => 'date', 'type' => 'date', 'rules' => 'date'] ], [ 'except' => ['show'], 'protected' => ['save'] ]) ->run(true);
Tests
git clone https://github.com/ibandominguez/restup-back.git
cd restup-back
phpunit
Roadmap
- Image uploads
- JWT auth configurable routes
Contributors
- Ibán Domínguez
License
Mit