petenys / laravel-json-api-generator
PeteNys Laravel JsonApi Generator
dev-master
2020-01-29 23:26 UTC
Requires
- php: ^7.2
- illuminate/support: ^6.13
- laracasts/flash: ~3.0
Requires (Dev)
- mockery/mockery: ^1.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-04-29 04:33:10 UTC
README
lets say you build a new table and run the migration (invoices)... you then just run the following command
php artisan petenys:json_api Invoice --fromTable --tableName=invoices --relations
builds the Model, Repository, Policy, Observer, Adapter, Schema, Validator and adds the route, json-api-v1 resource and adds the Observer to the ObserverProvider adds all the relations it can figure out from foreign keys as well
--include=controller,tests will also add those objects
or you can call any build by itself... petenys:adapter or petenys:controller or etc