Пример #1
0
 /**
  * Get the console command parameters.
  * @param Module $module
  * @return array
  */
 protected function getParameters(Module $module)
 {
     $params = [];
     $namespace = $module->getNamespace();
     $dbSeeder = $module->getName() . 'DatabaseSeeder';
     $dbSeeder = $namespace . 'Database\\Seeders\\' . $dbSeeder;
     $params['--class'] = $this->option('class') ? $this->option('class') : $dbSeeder;
     $params['--database'] = $this->option('database');
     return $params;
 }
Пример #2
0
 /**
  * Get the console command parameters.
  * @param Module $module
  * @return array
  */
 protected function getParameters(Module $module)
 {
     $params = [];
     $params['--path'] = str_replace(base_path(), '', $module->getPath());
     $params['--path'] .= 'Database/Migrations/';
     if ($option = $this->option('database')) {
         $params['--database'] = $option;
     }
     if ($option = $this->option('force')) {
         $params['--force'] = $option;
     }
     if ($option = $this->option('pretend')) {
         $params['--pretend'] = $option;
     }
     if ($option = $this->option('seed')) {
         $params['--seed'] = $option;
     }
     return $params;
 }
Пример #3
0
 /**
  * Returns the path to the destination file.
  * @return string
  */
 public function getFilePath()
 {
     $fileName = studly_case($this->handlerName) . '.php';
     return $this->module->getPath() . 'Handlers/' . ucfirst($this->handlerType) . 's/' . $fileName;
 }
Пример #4
0
 /**
  * Returns the path to the destination file.
  * @return string
  */
 public function getFilePath()
 {
     $migrationName = $this->getMigrationName();
     return $this->module->getPath() . 'Database/Migrations/' . $migrationName;
 }
Пример #5
0
 /**
  * Returns the path to the destination file.
  * @return string
  */
 public function getFilePath()
 {
     $fileName = studly_case($this->commandName) . '.php';
     return $this->module->getPath() . 'Commands/' . $fileName;
 }
Пример #6
0
 /**
  * Returns the path to the destination file.
  * @return string
  */
 public function getFilePath()
 {
     return $this->module->getPath() . 'Http/Requests/' . $this->getRequestName() . '.php';
 }
Пример #7
0
 /**
  * Returns the path to the destination file.
  * @return string
  */
 public function getFilePath()
 {
     $fileName = studly_case($this->eventName) . '.php';
     return $this->module->getPath() . 'Events/' . $fileName;
 }