From eac3ee28cdc92caca312ed044a79f4417e070ec3 Mon Sep 17 00:00:00 2001 From: egyjs Date: Tue, 29 Mar 2022 23:01:59 +0200 Subject: [PATCH] The MakeSettingsClass command speeds up the process --- src/Console/MakeSettingsClass.php | 61 +++++++++++++++++++++++++++++ src/Console/stubs/settingClass.stub | 21 ++++++++++ 2 files changed, 82 insertions(+) create mode 100644 src/Console/MakeSettingsClass.php create mode 100644 src/Console/stubs/settingClass.stub diff --git a/src/Console/MakeSettingsClass.php b/src/Console/MakeSettingsClass.php new file mode 100644 index 0000000..71ff7d9 --- /dev/null +++ b/src/Console/MakeSettingsClass.php @@ -0,0 +1,61 @@ +option('group')) { + $class = str_replace(['DummyView','{{ group }}'], $this->option('group'), $class); + } + + return $class; + } + protected function getDefaultNamespace($rootNamespace): string + { + return $rootNamespace.'\Settings'; + } + + +} diff --git a/src/Console/stubs/settingClass.stub b/src/Console/stubs/settingClass.stub new file mode 100644 index 0000000..02088ea --- /dev/null +++ b/src/Console/stubs/settingClass.stub @@ -0,0 +1,21 @@ +