dandb,
@dandb@mas.to avatar

Is there a built-in way to to partial resolution from the container in ?

I have a class that takes a model and then a few service classes. The model obviously isn't resolvable from the container, but the rest of the services are.

j3j5,
@j3j5@hachyderm.io avatar

@dandb Not sure I fully understand your use-case but maybe using container events you can fill the model when resolving? or maybe using the container to resolve the service classes inside the constructor and using makeWith() when creating the class?

dandb,
@dandb@mas.to avatar

@j3j5 Ah there it is, makeWith is exactly what I'm looking for. Thanks!

dandb,
@dandb@mas.to avatar

@j3j5 Looks like makeWith is just an alias to make, so it was there the whole time 😅

j3j5,
@j3j5@hachyderm.io avatar

@dandb LOL, you are right, how did I not notice this? I just checked and apparently this is the case since Laravel 5.5 🤯

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