comparison src/Generator/Controller/ControllerGenerator.php @ 22:ee8ef14e158d main-dev

Now able to include through composer
author Luka Sitas <sitas.luka.97@gmail.com>
date Wed, 26 Feb 2025 20:12:17 -0500
parents f0b0d014e448
children 827efbf4d73c
comparison
equal deleted inserted replaced
21:f0b0d014e448 22:ee8ef14e158d
62 return is_file($customPath) ? $customPath : __DIR__ . $stub; 62 return is_file($customPath) ? $customPath : __DIR__ . $stub;
63 } 63 }
64 64
65 /** 65 /**
66 * Get the path for the generated file. 66 * Get the path for the generated file.
67 *
68 * @param string|null $name
69 * @return string
70 */ 67 */
71 protected function getPath(?string $name = null): string 68 protected function getPath($name = null)
72 { 69 {
73 return str_replace( 70 return str_replace(
74 ['App\\', '\\'], 71 ['App\\', '\\'],
75 ['app/', '/'], 72 ['app/', '/'],
76 $this->getControllerNamespace() . '/' . $this->controller_name($this->getTableInput()) . '.php' 73 $this->getControllerNamespace() . '/' . $this->controller_name($this->getTableInput()) . '.php'