Support the ongoing development of →
Input IOC Architecture
Last updated 2 years ago.

Route::get() is returning a Illuminate\Routing\Route, so you would be calling icon() on Route not the Router.

If you wanted to extend the Router try looking at the newRoute method, which creates the new Route objects. Perhaps you can have that method using your extended version of Route, where you have added the icon method.


Hmm.. but on the Illuminate\Support\Facades\Route facade the getFacadeAccessor method is returning 'router' which is bound to Illuminate\Routing\Router ?

I'm trying to replace this binding but my replacement doesnt seem to be working properly.


Looks like that is being bound via Illuminate\Foundation\Application@registerBaseServiceProviders -> Illuminate\Routing\RoutingServiceProvider@register -> @registerRouter.


Sign in to participate in this thread!


Your banner here too?

astroanu astroanu Joined 22 Jan 2015


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.