/** * Execute the console command. * * @return void */ public function fire() { parent::fire(); if (!$this->option('plain')) { $this->createView(); } }
/** * 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'))]); } }
/** * 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']); } }
/** * Execute the console command. * * @return void */ public function fire() { if (!$this->option('event')) { return $this->error('Missing required option: --event'); } parent::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"]); } }
/** * 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]); } }
/** * 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(); }
/** * Execute the console command. * * @return void */ public function fire() { if (parent::fire() === false) { return; } if ($this->option('markdown')) { $this->writeMarkdownTemplate(); } }
/** * 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]); } } }
/** * 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')]); } } }
/** * @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]); } } }
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(); } }
/** * 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')]); } } }
/** * 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); } } }
/** * 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]); } } }
/** * Execute the console command. * * @return void */ public function fire() { $model = $this->parseModelName($this->argument('name')); // Check if the model class exists. if (!class_exists($model)) { $this->error("Model class '{$model}' does not exist!"); return false; } // Check if the model class implements the indexed model interface. if (!new $model() instanceof IndexedModelContract) { $this->error("Model class '{$model}' does not implement the '" . IndexedModelContract::class . "' interface!"); return false; } parent::fire(); }
/** * Execute the console command. * * @return void */ public function fire() { if (parent::fire() !== false) { if (!$this->option('no-migration')) { $table = $this->getTableInput(); $path = $this->laravel->databasePath() . '/migrations/' . date('Y_m_d_His') . '_create_' . $table . '_table.php'; $stub = $this->buildMigration($table); $this->files->put($path, $stub); $file = pathinfo($path, PATHINFO_FILENAME); $this->line("<info>Created Migration:</info> {$file}"); //$this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]); if ($this->option('run-migration')) { $this->call('migrate'); } } } }
public function fire() { if (!$this->app['config']->has('bitdev.generate.namespace.project') || empty($this->app['config']->get('bitdev.generate.namespace.project'))) { $this->namespace = $this->app->getNamespace(); $this->warn('Namespace will defined as ' . trim($this->namespace, '\\')); } else { $this->namespace = $this->app['config']->get('bitdev.generate.namespace.project'); $this->info('namespace using ' . trim($this->namespace, '\\')); } if (!$this->app['config']->has('bitdev.generate.basepath.apps') || empty($this->app['config']->get('bitdev.generate.basepath.apps'))) { $this->basepath = $this->app['path']; $this->warn('Basepath will defined as ' . trim($this->basepath, '/')); } else { $this->basepath = $this->app['config']->get('bitdev.generate.basepath.apps'); $this->info('basepath using ' . trim($this->basepath, '/')); } parent::fire(); }
public function fire() { parent::fire(); $name = str_plural(str_replace('-form', '', snake_case($this->argument('name'), '-'))); $from = __DIR__ . '/stubs/form.blade.stub'; $viewPath = config('administr.viewPath'); if (strlen($viewPath) > 0) { $viewPath .= '/'; } $targetPath = resource_path("views/{$viewPath}{$name}/"); $fileName = 'form.blade.php'; if ($this->files->exists($targetPath . $fileName)) { $this->error("File views/{$viewPath}{$name}/{$fileName} already exists!"); return; } if (!$this->files->isDirectory($targetPath)) { $this->files->makeDirectory($targetPath); } if ($this->files->copy($from, $targetPath . $fileName)) { $this->info("Created views/{$viewPath}{$name}/{$fileName}"); return; } $this->error("Could not create views/{$viewPath}{$name}/{$fileName}"); }
public function fire() { parent::fire(); $this->call('larakit:ide:quickform'); }
/** * Execute the console command. * * @return void */ public function fire() { $this->module = $this->findModule(); parent::fire(); }
/** * Execute the console command. * * @return void */ public function fire() { parent::fire(); }
/** * Execute the console command. * * @return void */ public function fire() { if (parent::fire() !== false) { if (!$this->files->exists($this->getClassPath($this->getModelInput()))) { $this->call('starter:model', ['name' => $this->getModelInput()]); } } }
public function fire() { $this->initOptions(); parent::fire(); }
/** * fire model and observer model class * @return void */ public function fire() { parent::fire(); $this->call('panel:createobserver', ['name' => $this->argument('name')]); }
/** * Execute the console command. * * @return void */ public function fire() { parent::fire(); $table = str_plural(strtolower(class_basename($this->argument('name')))); $this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]); }
/** * Execute the console command. * * @return void */ public function fire() { if (parent::fire() !== false) { } }
/** * @return bool */ public function fire() { $this->settings->type = $this->option('type'); $this->settings->isTest = Str::contains($this->settings->type, 'Test'); parent::fire(); }
/** * Execute the console command. * * @return void */ public function fire() { parent::fire(); $this->composer->dumpAutoloads(); }
/** * Execute the console command. * * @return void */ public function fire() { if (parent::fire() !== false) { $this->createMigration(); $this->createRepository(); $this->createTransformer(); } }