Infyom Laravel Code Generator, Generate CRUD, APIs Code

Infyom Laravel Code Generator  to generate CRUD, APIs, Test Cases and Swagger Documentation

support Laravel 5.6, good for API+Swagger

http://labs.infyom.com/laravelgenerator/docs

better laravel crud, API, generator. include swagger api docs

====

############ Commands examples:  ############
php artisan infyom:api User –fromTable –tableName=users –paginate=20 –save

php artisan infyom:api MqttMsg –fromTable –tableName=mqtt_msgs –paginate=20 –save

php artisan infyom:api Extractee –fromTable –tableName=extractees –paginate=20 –save

php artisan infyom:api Pallet –fromTable –tableName=pallets –paginate=20 –save

php artisan infyom:api Site –fromTable –tableName=sites –paginate=20 –save

php artisan infyom:api Landowner –fromTable –tableName=landowners –paginate=20 –save

php artisan infyom:api Box –fromTable –tableName=boxes –paginate=50 –save

php artisan infyom:api BoxGroup –fromTable –tableName=box_groups –paginate=20 –save

php artisan infyom:api Drum –fromTable –tableName=drums –paginate=20 –save

php artisan infyom:api Batch –fromTable –tableName=batches –paginate=20 –save
php artisan infyom:model Batch –fromTable –tableName=batches

======

swagger api docs

=======

Install swaggervel package from https://github.com/slampenny/Swaggervel.

Add Jlapp\Swaggervel\SwaggervelServiceProvider::class in to the Provider section in the config/app.php.

Run vendor publish. php
artisan vendor:publish
--provider="Jlapp\Swaggervel\SwaggervelServiceProvider"
 (If your laravel version is 5.5, then you can typephp
artisan vendor:publish
 only. It will ask you to select which provider you want to publish).

After that, you can browse /api/docs and /docs.

But, it still doesn’t support Laravel v5.4+. To use under Laravel v5.4+, you need to manually delete two lines in the L51-52 or check the laravel version first as mentioned here.

Comments 1

Leave a Reply

Your email address will not be published. Required fields are marked *