HeadRouteMacros
class HeadRouteMacros
Registers the withHead() route macros.
Each macro carries the full named-argument signature for the built-in route attributes so editors and static analysis can validate attribute names at every chain position; keep the five signatures, _ide_helper.php, and PHPStan's RoutingMacros signature in sync when adding route attributes. The macros delegate to Hypervel's native route metadata API immediately, so routes keep storing plain, cache-friendly arrays.
Methods
Register the withHead() macro on every routing surface.
Recover the typed routing object a macro closure was bound to.
Create the withHead() macro for group-position calls on the router, such as Route::withHead(...)->prefix('admin')->group(...).
Create the withHead() macro for chained group-position calls, such as Route::prefix('admin')->withHead(...)->group(...).
Create the withHead() macro for individual routes, such as Route::view('/dashboard', 'dashboard')->withHead(...).
Create the withHead() macro for resource registrations, such as Route::resource('posts', PostController::class)->withHead(...).
Create the withHead() macro for singleton resource registrations, such as Route::singleton('profile', ProfileController::class)->withHead(...).
Details
at line 33
void
register()
Register the withHead() macro on every routing surface.
These static macros affect every request in the worker.
at line 54
static object
bound(mixed $context, string $scope)
Recover the typed routing object a macro closure was bound to.
Macroable rebinds each macro closure at call time, so inside the closure $this is the routing object rather than this registrar.
at line 64
protected Closure
routerMacro()
Create the withHead() macro for group-position calls on the router, such as Route::withHead(...)->prefix('admin')->group(...).
at line 145
protected Closure
registrarMacro()
Create the withHead() macro for chained group-position calls, such as Route::prefix('admin')->withHead(...)->group(...).
at line 226
protected Closure
routeMacro()
Create the withHead() macro for individual routes, such as Route::view('/dashboard', 'dashboard')->withHead(...).
at line 307
protected Closure
pendingResourceMacro()
Create the withHead() macro for resource registrations, such as Route::resource('posts', PostController::class)->withHead(...).
at line 388
protected Closure
pendingSingletonMacro()
Create the withHead() macro for singleton resource registrations, such as Route::singleton('profile', ProfileController::class)->withHead(...).