protected function _generateControllerCode()
{
$this->_replaceInCode($this->_getStubPath() . 'Controller.stub',
- app_path() . '/Http/Controllers/Admin/' . $this->getCamelName() . 'Controller.php');
+ app_path() . '/Http/Controllers/Admin/' . $this->getStudlyName() . 'Controller.php');
}
protected function _replaceInCode($stub, $dest)
{
- $vars = ['CAMELNAME' => $this->getCamelName(),
+ $vars = ['STUDLYNAME' => $this->getStudlyName(),
'ROUTEURL' => $this->getOption('name'),
'SINGULAR' => $this->getOption('singular', $this->getOption('name')),
'PLURAL' => $this->getOption('plural', ''),
return __DIR__ . '/../../../resources/cubistmagic/';
}
- public function getCamelName()
+ public function getStudlyName()
{
- return Str::camel($this->getOption('name'));
+ return Str::studly($this->getOption('name'));
}
}