mallardduck / laravel-humanoid
This is my package laravel-humanoid
Requires
- php: ^8.0
- ext-json: *
- illuminate/contracts: ^10.0 || ^11.0
- roave/better-reflection: ^6.49
- robthree/humanoid: ^1.0
- symfony/var-dumper: ^6.0 || ^7.0
- symfony/yaml: ^7.0
Requires (Dev)
- infection/infection: ^0.29
- nunomaduro/collision: ^8.0
- nunomaduro/larastan: ^v3.0
- orchestra/testbench: ^9.0
- pestphp/pest: ^2.0 || ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^9.5 || ^10.0 || ^11.0
This package is auto-updated.
Last update: 2024-12-21 01:12:49 UTC
README
This package allows you to configure a HumanoID generator once and use it anywhere in your Laravel application. Once you've configured your site/apps HumanoID generator it's as easy as:
Generates a HumanoID via your preconfigured for (int) 42
HumanoID::create(42); // Using a facade (alias) to access the singleton. app(\RobThree\HumanoID\HumanoID::class)->create(42); // Or, get it via the app container. app(\MallardDuck\LaravelHumanoID\Facades\HumanoID::class)->create(42); // Or, get it via the app container.
A message to Russian 🇷🇺 people
If you currently live in Russia, please read this message.
Installation
You can install the package via composer:
composer require mallardduck/laravel-humanoid
You can publish the config file with:
php artisan vendor:publish --tag="laravel-humanoid-config"
This is the contents of the published config file:
return [ 'defaultGeneratorConfig' => (class_exists('\App\HumanoID\MyAppConfig')) ? \App\HumanoID\MyAppConfig::class : \MallardDuck\LaravelHumanoID\DefaultGeneratorConfig::class, 'wordSetsBasePath' => env('APP_HUMANOID_BASE', resource_path('humanoid/')), ];
Usage
- Publish the necessary vendor files,
- Publish the config files (optional),
$humanoID = new HumanoID::create(42); echo $humanoID; // 'Haumea-Pinwheel'
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.