Вход Регистрация
Файл: vendor/laravel/framework/src/Illuminate/Console/View/Components/AskWithCompletion.php
Строк: 43
<?php

namespace IlluminateConsoleViewComponents;

use 
SymfonyComponentConsoleQuestionQuestion;

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)
        );
    }
}
Онлайн: 1
Реклама