PHPackages                             bankdev/generators - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bankdev/generators

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bankdev/generators
==================

Laravel 4 Generators w/ Bootstrap 3

1196PHP

Since Aug 6Pushed 11y ago1 watchersCompare

[ Source](https://github.com/BankDev/Laravel4-Generators)[ Packagist](https://packagist.org/packages/bankdev/generators)[ RSS](/packages/bankdev-generators/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

### Forked from JeffreyWay/Laravel-4.2-Generators.

[](#forked-from-jeffreywaylaravel-42-generators)

This package updates the views provided by Jeffrey Way's original works to Bootstrap 3. The original documentation from Way's works follows. The instructions have been updated to reflect any changes within this package.

This Laravel 4.2 package provides a variety of generators to speed up your development process. These generators include:

- `generate:model`
- `generate:controller`
- `generate:seed`
- `generate:view`
- `generate:migration`
- `generate:resource`
- `generate:scaffold`
- `generate:form`
- `generate:test`
- `generate:pivot` &lt;-- NEW!!

Prefer a Video Walk-through?
----------------------------

[](#prefer-a-video-walk-through)

[See here.](http://tutsplus.s3.amazonaws.com/tutspremium/courses_$folder$/WhatsNewInLaravel4/9-Generators.mp4)

Installation
------------

[](#installation)

Begin by installing this package through Composer. Edit your project's `composer.json` file to require `bankdev/generators`.

```
"require": {
	"laravel/framework": "4.2.*",
	"bankdev/generators": "dev-master"
},
"minimum-stability" : "dev"

```

Next, update Composer from the Terminal:

```
composer update

```

Once this operation completes, the final step is to add the service provider. Open `app/config/app.php`, and add a new item to the providers array.

```
'BankDev\Generators\GeneratorsServiceProvider'

```

That's it! You're all set to go. Run the `artisan` command from the Terminal to see the new `generate` commands.

```
php artisan

```

> There's also a [Sublime Text plugin available](http://net.tutsplus.com/tutorials/tools-and-tips/pro-workflow-in-laravel-and-sublime-text/) to assist with the generators. Definitely use it, but not before you learn the syntax below.

Usage
-----

[](#usage)

Think of generators as an easy way to speed up your workflow. Rather than opening the models directory, creating a new file, saving it, and adding the class, you can simply run a single generate command.

- [Migrations](#migrations)
- [Models](#models)
- [Views](#views)
- [Seeds](#seeds)
- [Resources](#resources)
- [Scaffolding](#scaffolding)
- [Forms](#forms)
- [Tests](#tests)
- [Pivot Tables](#pivot-tables)

### Migrations

[](#migrations)

Laravel 4 offers a migration generator, but it stops just short of creating the schema (or the fields for the table). Let's review a couple examples, using `generate:migration`.

```
php artisan generate:migration create_posts_table

```

If we don't specify the `fields` option, the following file will be created within `app/database/migrations`.

```
