michael,
@michael@thms.uk avatar

I love this new Context feature. But I'm wondering if there is any way to use Context without the facade? I personally really prefer Dependence Injection, so I'd love to know if I can use it this way?

@nunomaduro do you know?


https://mastodon.social/@nunomaduro/112128764176469272

stefanzweifel,
@stefanzweifel@phpc.social avatar

@michael @nunomaduro Haven't tested it yet, but I think you could inject this Repository class to get access to the Context object.

https://github.com/laravel/framework/blob/11.x/src/Illuminate/Log/Context/Repository.php#L15

michael,
@michael@thms.uk avatar

@stefanzweifel great. Thank you! Will definitely have a look at the implementation of that as well.

@nunomaduro

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Laravel
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines