designbycode / laravel-business-name-generator
Laravel Business Name Generator is a Laravel package that generates business names based on a combination of adjectives and nouns. It provides a flexible and customizable way to generate business names that can be used for various purposes.
Fund package maintenance!
designbycode
Requires
- php: ^8.2|^8.3
- designbycode/business-name-generator: ^2.0
- illuminate/contracts: ^10.0||^11.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-arch: ^2.7
- pestphp/pest-plugin-laravel: ^2.3
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- spatie/laravel-ray: ^1.35
README
Laravel Business Name Generator is a Laravel package that generates business names based on a combination of adjectives and nouns. It provides a flexible and customizable way to generate business names that can be used for various purposes.
Installation
You can install the package via composer:
composer require designbycode/laravel-business-name-generator
This is the contents of the published config file:
return [
];
Usage
Basic Usage
use Designbycode\LaravelBusinessNameGenerator\Facades\BusinessNameGenerator; $businessName = BusinessNameGenerator::generate()->first();
Custom Adjectives and Nouns
You can also provide your own lists of adjectives and nouns:
$customAdjectives = ["Cool", "Amazing", "Super"]; $customNouns = ["Shop", "Hub", "Center"]; $generator = BusinessNameGenerator::generate($customAdjectives, $customNouns)->first(); echo $businessName; // Example output: "Super Shop"
Using Specific Categories
You can generate business names based on specific categories of adjectives and nouns:
// Generate a business name using playful adjectives and color-related nouns $businessName = BusinessNameGenerator::generate('playful', 'color')->first(); echo $businessName; // Example output: "Cheerful Blue"
Generating Multiple Names
// Generate a business name using playful adjectives and color-related nouns $businessName = BusinessNameGenerator::amount(2)->generate()->get(); echo $businessName; // Example output: ["Cheerful Blue", "Red Trading]
Adjective and Noun Categories
Adjective Categories
- default: Standard business-related adjectives.
- funny: Whimsical and humorous adjectives.
- playful: Light-hearted and playful adjectives.
- color: Color-related adjectives.
- all: A combination of all the above categories.
Noun Categories
- default: Standard business-related nouns.
- funny: Whimsical and humorous nouns.
- playful: Light-hearted and playful nouns.
- color: Color-related nouns.
- all: A combination of all the above categories.
Extending the Lists
If you want to extend the list of adjectives or nouns, you can create your own classes that implement the HasGeneratorLists interface.
namespace YourNamespace; use Designbycode\BusinessNameGenerator\HasGeneratorLists; class CustomAdjectives implements HasGeneratorLists { public function default(): array { return ["Energetic", "Bold", "Brilliant"]; } public function funny(): array { return ["Zany", "Wacky", "Goofy"]; } public function playful(): array { return ["Bouncy", "Jovial", "Perky"]; } public function color(): array { return ["Crimson", "Amber", "Sapphire"]; } }
Then use your custom class with the BusinessNameGenerator:
use Designbycode\BusinessNameGenerator\BusinessNameGenerator; use YourNamespace\CustomAdjectives; use Designbycode\BusinessNameGenerator\Nouns; $generator = BusinessNameGenerator::generate((new CustomAdjectives())->default(), (new Nouns())->default()); $businessName = BusinessNameGenerator::generate('default', 'default'); echo $businessName; // Example output: "Energetic Solutions"
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.