MigrateMakeCommand
class MigrateMakeCommand extends BaseCommand (View source)
Свойства
| protected Application | $laravel | Экземпляр приложения Laravel. | from Command |
| protected InputInterface | $input | Реализация интерфейса ввода. | from Command |
| protected OutputStyle | $output | Реализация интерфейса вывода. | from Command |
| protected string | $signature | Подпись команды консоли. | |
| protected string | $name | Имя команды консоли. | from Command |
| protected string | $description | Описание команды консоли. | |
| protected MigrationCreator | $creator | Экземпляр создателя миграций. | |
| protected Composer | $composer | Экземпляр Composer. |
Методы
| void | __construct(MigrationCreator $creator, Composer $composer) Создать новый экземпляр команды установки миграции. | |
| void | configureUsingFluentDefinition() Настроить консольную команду, используя плавное определение. | from Command |
| void | specifyParameters() Указать аргументы и параметры команды. | from Command |
| int | run(InputInterface $input, OutputInterface $output) Запустить консольную команду. | from Command |
| mixed | execute(InputInterface $input, OutputInterface $output) Выполнить консольную команду. | from Command |
| int | call(string $command, array $arguments = []) Вызвать другую консольную команду. | from Command |
| int | callSilent(string $command, array $arguments = []) Вызвать другую консольную команду без вывода. | from Command |
| string|array | argument(string $key = null) Получить значение аргумента команды. | from Command |
| string|array | option(string $key = null) Получить значение параметра команды. | from Command |
| bool | confirm(string $question, bool $default = false) Подтвердить вопрос с пользователем. | from Command |
| string | ask(string $question, string $default = null) Запросить ввод у пользователя. | from Command |
| string | anticipate(string $question, array $choices, string $default = null) Запросить ввод у пользователя с автодополнением. | from Command |
| string | askWithCompletion(string $question, array $choices, string $default = null) Запросить ввод у пользователя с автодополнением. | from Command |
| string | secret(string $question, bool $fallback = true) Запросить ввод у пользователя, но скрыть ответ от консоли. | from Command |
| string | choice(string $question, array $choices, string $default = null, mixed $attempts = null, bool $multiple = null) Предоставить пользователю единственный выбор из массива ответов. | from Command |
| void | table(array $headers, Arrayable|array $rows, string $style = 'default') Отформатировать ввод в текстовую таблицу. | from Command |
| void | info(string $string) Вывести строку как информационный вывод. | from Command |
| void | line(string $string) Вывести строку как стандартный вывод. | from Command |
| void | comment(string $string) Вывести строку как вывод комментария. | from Command |
| void | question(string $string) Вывести строку как вывод вопроса. | from Command |
| void | error(string $string) Вывести строку как вывод ошибки. | from Command |
| void | warn(string $string) Вывести строку как предупреждающий вывод. | from Command |
| array | getArguments() Получить аргументы консольной команды. | from Command |
| array | getOptions() Получить параметры консольной команды. | from Command |
| OutputInterface | getOutput() Получить реализацию вывода. | from Command |
| Application | getLaravel() Получить экземпляр приложения Laravel. | from Command |
| void | setLaravel(Application $laravel) Установить экземпляр приложения Laravel. | from Command |
| string | getMigrationPath() Получить путь к миграции (либо указанный параметром '--path', либо расположение по умолчанию). | |
| void | fire() Выполнить консольную команду. | |
| string | writeMigration(string $name, string $table, bool $create) Записать файл миграции на диск. |
Подробности
void __construct(MigrationCreator $creator, Composer $composer)
Создать новый экземпляр команды установки миграции.
protected void configureUsingFluentDefinition()
Настроить команду консоли с помощью определения fluent.
protected void specifyParameters()
Указать аргументы и опции в команде.
int run(InputInterface $input, OutputInterface $output)
Выполнить команду консоли.
protected mixed execute(InputInterface $input, OutputInterface $output)
Выполнить команду консоли.
int call(string $command, array $arguments = [])
Вызвать другую команду консоли.
int callSilent(string $command, array $arguments = [])
Вызвать другую команду консоли без вывода.
string|array argument(string $key = null)
Получить значение аргумента команды.
string|array option(string $key = null)
Получить значение опции команды.
bool confirm(string $question, bool $default = false)
Подтвердить вопрос у пользователя.
string ask(string $question, string $default = null)
Запросить ввод у пользователя.
string anticipate(string $question, array $choices, string $default = null)
Запросить ввод у пользователя с автозаполнением.
string askWithCompletion(string $question, array $choices, string $default = null)
Запросить ввод у пользователя с автозаполнением.
string secret(string $question, bool $fallback = true)
Запросить ввод у пользователя, скрыв ответ в консоли.
string choice(string $question, array $choices, string $default = null, mixed $attempts = null, bool $multiple = null)
Предложить пользователю выбрать один вариант ответа из массива.
void table(array $headers, Arrayable|array $rows, string $style = 'default')
Форматировать ввод в текстовую таблицу.
void info(string $string)
Вывести строку как информацию.
void line(string $string)
Вывести строку как стандартный вывод.
void comment(string $string)
Вывести строку как комментарий.
void question(string $string)
Вывести строку как вопрос.
void error(string $string)
Вывести строку как ошибку.
void warn(string $string)
Вывести строку как предупреждение.
protected array getArguments()
Получить аргументы команды консоли.
protected array getOptions()
Получить параметры команды консоли.
OutputInterface getOutput()
Получить реализацию вывода.
Application getLaravel()
Получить экземпляр приложения Laravel.
void setLaravel(Application $laravel)
Установить экземпляр приложения Laravel.
protected string getMigrationPath()
Получить путь к миграциям (указанный опцией '--path' или по умолчанию).
void fire()
Выполнить команду консоли.
protected string writeMigration(string $name, string $table, bool $create)
Записать файл миграции в хранилище.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.1/Illuminate/Database/Console/Migrations/MigrateMakeCommand.html