Mercurial > packages > magicforger
diff src/Replacer.php @ 3:6468684362c2
It works! Created a controller, no update insert but it works
| author | luka |
|---|---|
| date | Tue, 27 Jun 2023 15:32:47 -0400 |
| parents | cf9993c5c7df |
| children |
line wrap: on
line diff
--- a/src/Replacer.php Sun Jun 25 14:45:15 2023 -0400 +++ b/src/Replacer.php Tue Jun 27 15:32:47 2023 -0400 @@ -14,22 +14,6 @@ protected $replacement_cache = []; - /** - * Prefix and Suffix for controller. - * Usage is up to the user. - * - * @var string - */ - protected $controller_prefix = ""; - - - /** - * Prefix and Suffix for controller. - * Usage is up to the user. - * - * @var string - */ - protected $controller_suffix = "Controller"; /** @@ -45,44 +29,6 @@ /* parent::__construct(); */ } - /** - * Model names are generated in uppercase first Camel case - */ - public function model_name(string $name): string - { - return Str::singular(Str::studly($name)); - } - - /** - * Controller names are generated in uppercase first Camel case - * and wrapped in the prefix and suffix - */ - public function controller_name(string $name): string - { - return $this->controller_prefix . - $this->model_name($name) . - $this->controller_suffix; - } - - /** - * Breaks up a string and makes it human readable - * - * This function assumes that the inputted name is camel case - */ - public function human_readable(string $name): string - { - return Str::title(Str::replace('_', ' ', $name)); - } - - /** - * Breaks up a string and makes it human readable and lowecase - * - * This function assumes that the inputted name is camel case - */ - public function human_readable_lc(string $name): string - { - return Str::lower($this->human_readable($name)); - } /** * Outputs a log for the replacements based on log level.
