📋 Commit iniziale con: - ✅ Documentazione unificata in docs/ - ✅ Codice Laravel in netgescon-laravel/ - ✅ Script automazione in scripts/ - ✅ Configurazione sync rsync - ✅ Struttura organizzata e pulita 🔄 Versione: 2025.07.19-1644 🎯 Sistema pronto per Git distribuito
30 lines
751 B
PHP
30 lines
751 B
PHP
<?php
|
|
|
|
namespace Illuminate\Console\View\Components;
|
|
|
|
use Symfony\Component\Console\Question\Question;
|
|
|
|
class AskWithCompletion extends Component
|
|
{
|
|
/**
|
|
* Renders the component using the given arguments.
|
|
*
|
|
* @param string $question
|
|
* @param array|callable $choices
|
|
* @param string $default
|
|
* @return mixed
|
|
*/
|
|
public function render($question, $choices, $default = null)
|
|
{
|
|
$question = new Question($question, $default);
|
|
|
|
is_callable($choices)
|
|
? $question->setAutocompleterCallback($choices)
|
|
: $question->setAutocompleterValues($choices);
|
|
|
|
return $this->usingQuestionHelper(
|
|
fn () => $this->output->askQuestion($question)
|
|
);
|
|
}
|
|
}
|