Generator Commands

  1. Rollback
  2. Migration
  3. Model
  4. Repository
  5. API Controller
  6. API Requests
  7. Tests
  8. Scaffold Controller
  9. Scaffold Requests
  10. Views

The Generator has various commands to generate files in a group or individually. Sometimes you need to generate/re-generate individual files after making some manual changes to some files and you don't want the generator to override your changes.

Also, it has command to rollback all generated files.

Rollback Command

To rollback all generated files, we have the following command,


php artisan infyom:rollback $MODEL_NAME $COMMAND_TYPE 

Where,

$MODEL_NAME - Its a model name for which you want to delete files

$COMMAND_TYPE - Command type from api, scaffold or api_scaffold

If you have run migration on database, then better you rollback that migration first and then run infyom:rollback command, since it will delete migration file as well. Otherwise laravel can throw error about missing migration files.

Migration Generator Command


php artisan infyom:migration $MODEL_NAME 

Model Generator Command


php artisan infyom:model $MODEL_NAME 

Repository Generator Command


php artisan infyom:repository $MODEL_NAME 

API Controller Generator Command


php artisan infyom.api:controller $MODEL_NAME 

API Requests Generator Command


php artisan infyom.api:requests $MODEL_NAME 

Tests Generator Command


php artisan infyom.api:tests $MODEL_NAME 

Scaffold Controller Generator Command


php artisan infyom.scaffold:controller $MODEL_NAME 

Scaffold Requests Generator Command


php artisan infyom.scaffold:requests $MODEL_NAME 

Views Generator Command


php artisan infyom.scaffold:views $MODEL_NAME 
Made with Generator