iamx / api-crud-generator
Make an easy HATEOAS Api
v2.0
2020-07-04 20:27 UTC
Requires
- php: ^5.5 || ^7.0
- spatie/laravel-fractal: ^5.7
This package is auto-updated.
Last update: 2024-05-05 05:59:44 UTC
README
Installation
$ composer require iamx/api-crud-generator
Database
Set your database properties in .env file
Create a new Api CRUD
$ php artisan make:crud Test
Now you can edit
Folder | File |
---|---|
app | Test.php |
app/Transformers | TestTransformer.php |
app/Http/Controller/Api/Test | TestController.php |
app/Http/Requests | TestRequest.php |
app/database/migrations | 2014_10_12_000000_create_tests_table.php |
Migrate
$ php artisan migrate
Then you can see the routes in routes/api.php file
Start the server and go to 127.0.0.1:8000/api/tests
License
MIT