From: Vincent Vanwaelscappel Date: Thu, 23 May 2019 17:36:44 +0000 (+0200) Subject: #2783 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=29e2a4bd17b75300c628a8f931ae4594de40c2a4;p=cubist_cms-back.git #2783 --- diff --git a/src/app/Magic/Models/CubistMagicModelAbstract.php b/src/app/Magic/Models/CubistMagicModelAbstract.php index 3f2382e..e3334b3 100644 --- a/src/app/Magic/Models/CubistMagicModelAbstract.php +++ b/src/app/Magic/Models/CubistMagicModelAbstract.php @@ -73,13 +73,13 @@ class CubistMagicModelAbstract extends Model 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', ''), @@ -104,8 +104,8 @@ class CubistMagicModelAbstract extends Model return __DIR__ . '/../../../resources/cubistmagic/'; } - public function getCamelName() + public function getStudlyName() { - return Str::camel($this->getOption('name')); + return Str::studly($this->getOption('name')); } }