<commit_before># Laravel 5.1 File Generators

Custom Laravel 5 File Generators with a config file and publishable stubs.
You can add new stubs in the config.
This package can be used by anyone, but keep in mind that it is optimized for my personal workflow.
Please let me know about any issues or new features you would like to have.

## Commands
```bash
php artisan generate:publish-stubs
php artisan generate:model
php artisan generate:view
php artisan generate:controller
php artisan generate:migration
php artisan generate:migration:pivot
php artisan generate:seed
php artisan generate:resource
php artisan generate:file
```

### Option for all the commands
`--force` This will overide the existing file, if it exist.

### Option for all the commands, except `views` and `migration:pivot`
`--plain` This will use the .plain stub of the command (generate an empty controller)

### Customization
This is for all except the `migration` and `migration:pivot` commands

```
php artisan generate:file foo.bar --type=controller
php artisan generate:view foo.bar --stub=view_show --name=baz_show
php artisan generate:file foo.bar --type=controller --stub=controller_custom --name=BazzzController --plain --force
```

You can specify a custom name of the file to be generated.
You can add the --plain or --force options.
You can override the default stub to be used.
You can create your own stubs with the available placeholders.
You can create new settings' types, for example: 
- 'exception' => ['namespace' => '\Exceptions', 'path' => './app/Exceptions/', 'postfix' => 'Exception'],

[Available placeholders](https://github.com/bpocallaghan/generators/blob/master/resources/stubs/example.stub)

## Views Custom Stubs

```
php artisan generate:view posts
php artisan generate:view admin.posts --stub=custom
php artisan generate:view admin.posts --stub=another_file
```

## Installation

Update your project's `composer.json` file.

```
composer require bpocallaghan/generators --dev
```

App the Service Provider
You'll only want to use these generators for local development, add the provider in `app/Providers/AppServiceProvider.php`:

```php
public function register()
{
	if ($this->app->environment() == 'local') {
		$this->app->register('Bpocallaghan\Generators\GeneratorsServiceProvider');
	}
}<commit_msg>Laravel 5.2 update<commit_after># Laravel 5.2 File Generators

Custom Laravel 5 File Generators with a config file and publishable stubs.
You can add new stubs in the config.
This package can be used by anyone, but keep in mind that it is optimized for my personal workflow.
Please let me know about any issues or new features you would like to have.

## Commands
```bash
php artisan generate:publish-stubs
php artisan generate:model
php artisan generate:view
php artisan generate:controller
php artisan generate:migration
php artisan generate:migration:pivot
php artisan generate:seed
php artisan generate:resource
php artisan generate:file
```

### Option for all the commands
`--force` This will overide the existing file, if it exist.

### Option for all the commands, except `views` and `migration:pivot`
`--plain` This will use the .plain stub of the command (generate an empty controller)

### Customization
This is for all except the `migration` and `migration:pivot` commands

```
php artisan generate:file foo.bar --type=controller
php artisan generate:view foo.bar --stub=view_show --name=baz_show
php artisan generate:file foo.bar --type=controller --stub=controller_custom --name=BazzzController --plain --force
```

You can specify a custom name of the file to be generated.
You can add the --plain or --force options.
You can override the default stub to be used.
You can create your own stubs with the available placeholders.
You can create new settings' types, for example: 
- 'exception' => ['namespace' => '\Exceptions', 'path' => './app/Exceptions/', 'postfix' => 'Exception'],

[Available placeholders](https://github.com/bpocallaghan/generators/blob/master/resources/stubs/example.stub)

## Views Custom Stubs

```
php artisan generate:view posts
php artisan generate:view admin.posts --stub=custom
php artisan generate:view admin.posts --stub=another_file
```

## Installation

Update your project's `composer.json` file.

```
composer require bpocallaghan/generators --dev
```

App the Service Provider
You'll only want to use these generators for local development, add the provider in `app/Providers/AppServiceProvider.php`:

```php
public function register()
{
	if ($this->app->environment() == 'local') {
		$this->app->register(\Bpocallaghan\Generators\GeneratorsServiceProvider::class);
	}
}
{'fraction_non_alphanumeric': 0.10110174983797797, 'fraction_numerical': 0.0017282350399654353, 'mean_word_length': 4.974193548387097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2668940', 'n_tokens_mistral': 1344, 'n_tokens_neox': 1300, 'n_words': 536}