MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / controllerPath

Function controllerPath

src/resolution/frameworks/laravel.ts:566–568  ·  view source on GitHub ↗

A string handler's class as a path under the controllers root, a leading `\\` and `App\\Http\\Controllers\\` off.

(written: string)

Source from the content-addressed store, hash-verified

564
565/** A string handler's class as a path under the controllers root, a leading `\\` and `App\\Http\\Controllers\\` off. */
566function controllerPath(written: string): string {
567 return written.replace(/^\\+/, '').replace(/^App\\Http\\Controllers\\/i, '');
568}
569
570/** A class written with its namespace path (`Common\\Companies`). */
571const NAMESPACED_CLASS = /^[A-Za-z_]\w*(?:\\\w+)+$/;

Callers 1

extractLaravelHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected