本文整理汇总了PHP中Illuminate\Console\GeneratorCommand::fire方法的典型用法代码示例。如果您正苦于以下问题:PHP GeneratorCommand::fire方法的具体用法?PHP GeneratorCommand::fire怎么用?PHP GeneratorCommand::fire使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Console\GeneratorCommand
的用法示例。
在下文中一共展示了GeneratorCommand::fire方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fire
/**
* Execute the console command.
*
* @return void
*/
public function fire()
{
parent::fire();
if (!$this->option('plain')) {
$this->createView();
}
}
示例2: fire
/**
* Execute the command.
*
* @return void
*/
public function fire()
{
parent::fire();
if ($this->option('handler')) {
$this->call('handler:command', ['name' => $this->argument('name') . 'Handler', '--command' => $this->parseName($this->argument('name'))]);
}
}
示例3: fire
/**
* Override the parent `fire` method so we can create our implementation as well
*/
public function fire()
{
parent::fire();
if ($this->option('which') == 'contract') {
$this->call('parse:repository', ['name' => $this->argument('name'), '--which' => 'implementation']);
}
}
示例4: fire
/**
* Execute the console command.
*
* @return void
*/
public function fire()
{
if (!$this->option('event')) {
return $this->error('Missing required option: --event');
}
parent::fire();
}
示例5: fire
/**
* Execute the console command.
*
* @return void
*/
public function fire()
{
if (parent::fire() !== false && $this->option('translated')) {
$name = $this->getNameInput();
$this->type = 'Admin model translation class';
$this->call('administr:model', ['name' => "{$name}Translation"]);
}
}
示例6: fire
/**
* Execute the console command.
*
* @return void
*/
public function fire()
{
parent::fire();
if (!$this->option('no-migration')) {
$table = str_plural(snake_case(class_basename($this->argument('name'))));
$this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
}
}
示例7: handle
/**
* Execute the console command.
*
* @return void
*/
public function handle()
{
if (!$this->modelExists()) {
$this->error('Model does not exists !');
return false;
}
$this->type = $this->parseName($this->getNameInput());
parent::fire();
}
示例8: fire
/**
* Execute the console command.
*
* @return void
*/
public function fire()
{
if (parent::fire() === false) {
return;
}
if ($this->option('markdown')) {
$this->writeMarkdownTemplate();
}
}
示例9: fire
/**
* Execute the console command.
*
* @return void
*/
public function fire()
{
if (parent::fire() !== false) {
if ($this->option('migration')) {
$table = Str::plural(Str::snake(class_basename($this->argument('name'))));
$this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
}
}
}
示例10: fire
/**
* Execute the console command.
*
* @return void
*/
public function fire()
{
if (parent::fire() !== false) {
if ($this->option('migration') && $this->table != '') {
$table = $this->table;
$this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
}
if ($this->option('repository')) {
$this->call('make:repository', ['name' => $this->argument('name')]);
}
}
}
示例11: fire
/**
* @return void
*/
public function fire()
{
if (parent::fire() !== false) {
if ($this->option('migration')) {
$table = Str::plural(Str::snake(class_basename($this->argument('name'))));
$this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
}
if ($this->option('controller')) {
$controller = Str::camel(class_basename($this->argument('name')));
$this->call('make:controller', ['name' => "{$controller}Controller", '--resource' => true]);
}
}
}
示例12: fire
public function fire()
{
if ($this->compound !== null) {
if (parent::fire() !== false) {
if ($this->option($this->compound)) {
$name = $this->argument('name');
$this->call("hive:{$this->compound}", ['name' => $name]);
}
}
} else {
parent::fire();
}
}
示例13: fire
/**
* Execute the console command.
*
* @return void
*/
public function fire()
{
if (parent::fire() !== false) {
if ($this->option('model')) {
$this->call('make:model', ['name' => $this->argument('name')]);
$table = str_replace('._', '_', Str::plural(Str::snake(class_basename($this->argument('name')))));
$this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
}
if ($this->option('testcase')) {
$this->call('make:test', ['name' => $this->argument('name')]);
}
}
}
示例14: fire
/**
* Execute the console command.
*
* @return void
*/
public function fire()
{
if (parent::fire() !== false) {
if (!$this->option('no-routes')) {
$path = Config::get('generator.path_routes', app_path('Http/routes.php'));
$path = Config::get('generator.path_routes', app_path('Http/routes.php'));
$content = $this->files->get($path);
$name = $this->parseName($this->getNameInput());
$content .= $this->buildRoute($name);
$this->files->put($path, $content);
}
}
}
示例15: fire
/**
* Execute the console command.
*
* @return void
*/
public function fire()
{
if (parent::fire() !== false) {
if ($this->option('with-repository')) {
$this->comment('making repository');
$this->call('api:new-repository', ['name' => $this->argument('name')]);
}
if ($this->option('with-migration')) {
$this->comment('making migration');
$name = $this->argument('name');
$table = str_plural(snake_case($name));
$this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
}
}
}