https://github.com/krafthaus/name-generator
Name generator for your next Laravel project.
https://github.com/krafthaus/name-generator
generator laravel name project
Last synced: 5 months ago
JSON representation
Name generator for your next Laravel project.
- Host: GitHub
- URL: https://github.com/krafthaus/name-generator
- Owner: krafthaus
- License: mit
- Created: 2017-03-09T10:41:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-10T18:19:20.000Z (over 9 years ago)
- Last Synced: 2025-10-07T16:37:23.757Z (9 months ago)
- Topics: generator, laravel, name, project
- Language: PHP
- Size: 10.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Name Generator for Laravel
[](https://packagist.org/packages/krafthaus/name-generator)
[](https://travis-ci.org/krafthaus/name-generator)
[](https://packagist.org/packages/krafthaus/name-generator)
[](https://styleci.io/repos/84430527)
## Installation
Add name-generator to your composer.json file:
```
"require": {
"krafthaus/name-generator": "^1.0"
}
```
Use composer to install the package:
```
$ composer update
```
Register the package:
```
'providers' => [
// ...
KraftHaus\NameGenerator\NameGeneratorServiceProvider::class,
]
```
Publish the configuration files:
```
$ php artisan vendor:publish --provider="KraftHaus\NameGenerator\NameGeneratorServiceProvider" --tag=config
```
## Usage
#### Generate a string of random words:
```php
$words = KraftHaus\NameGenerator\Facades\Generator::generate();
// output: word1 word2
// Or define the amount of words you'd like to output:
$words = KraftHaus\NameGenerator\Facades\Generator::generate(5);
// output: word1 word2 word3 word4 word5
// With the glue parameter:
$words = KraftHaus\NameGenerator\Facades\Generator::generate(3, '-');
// output: word1-word2-word3
```
#### Generate an array of random words:
```php
$words = KraftHaus\NameGenerator\Facades\Generator::raw();
// output: ['word1', 'word2'];
// Or define the amount of words you'd like to output:
$words = KraftHaus\NameGenerator\Facades\Generator::raw(4);
// output: ['word1', 'word2', 'word3', 'word4'];
```
## License
This package is available under the [MIT license](https://github.com/krafthaus/name-generator/blob/master/LICENSE).
Copyright (c) 2017 KraftHaus