is a popular Laravel package that automates quite a bit of file creation. In addition to
models, it can also generate
seeds, and more, all through a command-line interface.
For this recipe, we'll be using the Laravel 4 Generators package maintained by Jeffrey Way that was installed in the Downloading and installing packages recipe. We'll also need a properly configured MySQL database.
Follow these steps for this recipe:
php artisan generate:scaffold cities --fields="city:string"