コード例 #1
0
 public function getPath()
 {
     return parent::getSrcPath(self::PATH_VIEWS, strtolower($this->argument('name')) . '.blade.php');
 }
コード例 #2
0
 /**
  * Get the path to the file that should be generated.
  *
  * @return string
  */
 protected function getPath()
 {
     return parent::getSrcPath(self::PATH_MIGRATIONS, ucwords($this->argument('name')) . '.php');
 }
コード例 #3
0
 /**
  * Get the path to the language templates that contain translations to be added to the
  * corresponding translation file
  *
  * @return string
  */
 protected function getLangFile($group, $locale = null)
 {
     return parent::getSrcPath(self::PATH_LANG, $locale ? $locale . $group . '.php' : '');
 }
コード例 #4
0
 /**
  * Get the path to the file that should be generated.
  *
  * @return string
  */
 protected function getPath()
 {
     return parent::getSrcPath(self::PATH_TESTS, studly_case($this->argument('name')) . '.php');
 }
コード例 #5
0
 public function fire()
 {
     $this->generator->setOptions($this->option());
     $tables = $this->sortDesiredTables();
     $this->call('generate:migration', array_merge(parent::commonOptions(array()), array('name' => "pivot_{$tables[0]}_{$tables[1]}_table", '--fields' => implode(', ', array("{$tables[0]}_id:integer:unsigned:index", "{$tables[1]}_id:integer:unsigned:index", "{$tables[0]}_id:foreign:references('id'):on('" . str_plural($tables[0]) . "'):onDelete('cascade')", "{$tables[1]}_id:foreign:references('id'):on('" . str_plural($tables[1]) . "'):onDelete('cascade')")))));
 }
コード例 #6
0
 protected function generateSeed()
 {
     $this->call('generate:seed', parent::commonOptions(array('name' => Pluralizer::plural(strtolower(substr($this->model, 0, 1)) . substr($this->model, 1)))));
 }
コード例 #7
0
 /**
  * Get the path to the file that should be generated.
  *
  * @return string
  */
 protected function getPath($name = null)
 {
     return parent::getSrcPath(self::PATH_SEEDS, $name);
 }