CrestApps

Crestapp Laravel CRUD generator

Home page: https://www.crestapps.com/

GIT: https://github.com/CrestApps/laravel-code-generator

### Steps Used during the screencast The following is the first command I used to generate the Singer resource-file (i.e singers.json)

php artisan resource-file:create Singer –fields=”id,name,name:gender;options:male|female;html-type:select;data-type:enum,name:music_type;html-type:checkbox;options:country|pop|rock|jazz|rap,is_retired” 

To create a layout for my views I used the following command. Note: that this command create a layout with a client side validation.

php artisan create:layout “Music Library”

To use the resource-file (i.e singers.json) to generate the first resource (controller, model, views, routes and migration) I executed the following command php artisan create:resources Singer –with-migration 

To check on the status of all of my migrations, I used the following command. php artisan migrate:status-all 

The following command was used to migrate all of my migration “including the migration in the sub folders” php artisan migrate-all

The following command was used to append the “notes” field to the singers.json resource file php artisan resource-file:append Singer –fields=notes

Create the migration to add the new field to our database’s table php artisan create:migration Singer Additionally, you can create the following command php artisan create:resources Singer –with-migration –force 

To create the resource file for the SongCategory (song_categories.json file) I used the following command php artisan resource-file:create SongCategory –fields=id,name 

To create all resources for the (SongCategory) with migration, I used the following command php artisan create:resources SongCategory –with-migration

To create the resource file for the Song (songs.json file) I used the following command php artisan resource-file:create Song –fields=id,title,album,singer_id,release_year,song_category_id,file 

To create all resources for the (Song) with migration, I used the following command php artisan create:resources Song –with-migration 

The I used the following command to migrate the outstanding migrations php artisan migrate-all 

I used the following command to generate all the resources with a form-request to clean up my controller. php artisan create:resources Song –with-form-request


Don’t forget to run publish command

php artisan vendor:publish --provider="CrestApps\CodeGenerator\CodeGeneratorServiceProvider"