schneespur/release/schneespur-1.0.2/vendor/laravel/prompts/playground/number.php
Michael 7288b93500 Release v1.0.2: diagnostic infrastructure core
Add neutral diagnostic framework for future reporting modules:
- DiagnosticReporterInterface, Registry, Manager, PayloadSanitizer
- Laravel exception hook in bootstrap/app.php
- Module permission declarations (requires_permissions in module.json)
- Core diagnostic report points (module boot/install/update failures)
- Module documentation update (moduldoku.md)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-18 16:54:11 +00:00

21 lines
455 B
PHP

<?php
use function Laravel\Prompts\number;
require __DIR__.'/../vendor/autoload.php';
$value = number(
label: 'How many items do you want to buy?',
placeholder: 'E.g. 10',
validate: fn ($value) => match (true) {
$value !== 6 => 'Actually you have to buy 6 items.',
default => null,
},
hint: 'You can buy up to 10 items.',
min: 1,
max: 10,
);
var_dump($value, gettype($value));
echo str_repeat(PHP_EOL, 5);