## CRUD Generator Commands

The CRUD generator is a simple yet powerful tool which is useful for creating all of the base CRUD scaffolding for new models. It will quickly generate the controller, model, migration, views, and insert your menu item and routes automatically. It will save you tons of time and hassle.

All you need to do is make a CRUD config file, modify it, then generate with it.

### Making CRUD Config Files

Simply run:

    php artisan crud:config ModelName

Where `ModelName` is the class name for the new model. This creates a new `config/crud/ModelName.php` file which can be used by the generator. You'll want to edit this file before using it to generate.

### Generating CRUD

Once you are done editing the CRUD config file for the new model, you can use it to generate CRUD:

    php artisan crud:generate ModelName

Again, where `ModelName` is the name of the new model. This will use the config file `config/crud/ModelName.php` to automatically do all of the tedious stuff for you.

After you run this command it will ask you if you want to migrate. You can simply enter `y` to migrate immediately, or `n` if you still want to tweak things before migrating. If you choose `n`, you will need to run the new migration created by the generator later, or the UI will obviously throw a database error. This can easily be done by running `php artisan migrate`.