thefourthdev / laravel-dice
Roll the dice!
v0.4.0
2025-04-30 15:47 UTC
Requires
- php: ^8.4
- spatie/laravel-package-tools: ^1.92.4
- thefourthdev/dice: ^v0.4.0
Requires (Dev)
- larastan/larastan: ^v2.11.0
- laravel/pint: ^v1.22.0
- nunomaduro/collision: ^v8.8.0
- orchestra/testbench: ^v9.13.1
- pestphp/pest: ^v3.8.2
- pestphp/pest-plugin-arch: ^v3.1.1
- pestphp/pest-plugin-laravel: ^v3.2.0
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan-deprecation-rules: ^1.2.1
- phpstan/phpstan-phpunit: ^1.4.2
README
Roll the dice!
Installation
You can install the package via composer:
composer require thefourthdev/laravel-dice
You can publish and run the migrations with:
php artisan vendor:publish --tag="dice-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="dice-config"
This is the contents of the published config file:
return [
'route' => '/dice/api',
];
Optionally, you can publish the views using
php artisan vendor:publish --tag="dice-views"
Usage
use TheFourthDev\LaravelDice\Facades\LaravelDice;
$value = LaravelDice::d6(); // e.g. 5
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.