]> _ Git - cubist_cms-back.git/commitdiff
#2783
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 23 May 2019 17:36:44 +0000 (19:36 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 23 May 2019 17:36:44 +0000 (19:36 +0200)
src/app/Magic/Models/CubistMagicModelAbstract.php

index 3f2382e4e34bd86dee51ffc49b558a21d10971b3..e3334b3ca13c9eefb570fddc81e6b92954585f1a 100644 (file)
@@ -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'));
     }
 }