php - Laravel - override default facade bindings - how? -
http://laravel.com/docs/5.1/facades
facades listed on linked page @ bottom. question is... how override these service container bindings?
example, request
facade binds illuminate\http\request
key request
. want create own class inherits illuminate\http\request
, bind request
key, instead of current class. , can't find service provider binds this.
so, kind of did it. first noticed these bindings hardcoded in illuminate\foundation\application::registercorecontaineraliases()
extended class , overrode method change it. had call class in bootstrap\app.php
, doing didn't help, still getting instance of illuminate\http\request
.
so discovered illuminate\http\request
directly referenced in public\index.php
tried changing there my\very\own\http\request
, worked, implementation being used.
finally, deleted version of application::registedcorecontaineraliases()
, reverted bootstrap\app.php
because working without change.
Comments
Post a Comment