I’m doing this:
IlluminateRoutingRoute::macro('description', function (string $description): AppServiceProvider|IlluminateRoutingRoute {
$this->action['description'] = isset($this->action['description']) ? $this->action['description'].$description : $description;
return $this;
});
So I can do this:
Route::post('/test', [TestController::class, 'test'])->description('this is a test description');
Then I will access the description as normally should by:
$request->route()->getAction('description');
The problem I’m facing is that if we add a new mixin/macro on IlluminateRoutingRoute, it cannot be accessed from RouteRegistrar because the $allowedAttributes are hardcoded.
Any work around for this?