A string handler's class as a path under the controllers root, a leading `\\` and `App\\Http\\Controllers\\` off.
(written: string)
| 624 | |
| 625 | /** A string handler's class as a path under the controllers root, a leading `\\` and `App\\Http\\Controllers\\` off. */ |
| 626 | function controllerPath(written: string): string { |
| 627 | return written.replace(/^\\+/, '').replace(/^App\\Http\\Controllers\\/i, ''); |
| 628 | } |
| 629 | |
| 630 | /** A class written with its namespace path (`Common\\Companies`), or from the root (`\\App\\Http\\Controllers\\Admin\\X`). */ |
| 631 | const NAMESPACED_CLASS = /^(?:\\[A-Za-z_]\w*(?:\\\w+)*|[A-Za-z_]\w*(?:\\\w+)+)$/; |
no outgoing calls
no test coverage detected