public function getPath() { return parent::getSrcPath(self::PATH_VIEWS, strtolower($this->argument('name')) . '.blade.php'); }
/** * 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'); }
/** * 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' : ''); }
/** * 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'); }
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')"))))); }
protected function generateSeed() { $this->call('generate:seed', parent::commonOptions(array('name' => Pluralizer::plural(strtolower(substr($this->model, 0, 1)) . substr($this->model, 1))))); }
/** * Get the path to the file that should be generated. * * @return string */ protected function getPath($name = null) { return parent::getSrcPath(self::PATH_SEEDS, $name); }