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

void
register()

Register the withHead() macro on every routing surface.

static object
bound(mixed $context, string $scope)

Recover the typed routing object a macro closure was bound to.

routerMacro()

Create the withHead() macro for group-position calls on the router, such as Route::withHead(...)->prefix('admin')->group(...).

registrarMacro()

Create the withHead() macro for chained group-position calls, such as Route::prefix('admin')->withHead(...)->group(...).

routeMacro()

Create the withHead() macro for individual routes, such as Route::view('/dashboard', 'dashboard')->withHead(...).

pendingResourceMacro()

Create the withHead() macro for resource registrations, such as Route::resource('posts', PostController::class)->withHead(...).

pendingSingletonMacro()

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.

Return Value

void

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.

Parameters

mixed $context
string $scope

Return Value

object

at line 64
protected Closure routerMacro()

Create the withHead() macro for group-position calls on the router, such as Route::withHead(...)->prefix('admin')->group(...).

Return Value

Closure

at line 145
protected Closure registrarMacro()

Create the withHead() macro for chained group-position calls, such as Route::prefix('admin')->withHead(...)->group(...).

Return Value

Closure

at line 226
protected Closure routeMacro()

Create the withHead() macro for individual routes, such as Route::view('/dashboard', 'dashboard')->withHead(...).

Return Value

Closure

at line 307
protected Closure pendingResourceMacro()

Create the withHead() macro for resource registrations, such as Route::resource('posts', PostController::class)->withHead(...).

Return Value

Closure

at line 388
protected Closure pendingSingletonMacro()

Create the withHead() macro for singleton resource registrations, such as Route::singleton('profile', ProfileController::class)->withHead(...).

Return Value

Closure