From 29e2a4bd17b75300c628a8f931ae4594de40c2a4 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 23 May 2019 19:36:44 +0200 Subject: [PATCH] #2783 --- src/app/Magic/Models/CubistMagicModelAbstract.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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')); } } -- 2.39.5