search

Home  >  Q&A  >  body text

providers - How do service providers work in laravel?

In laravel, when will the service provider in app/Providers be triggered in the program?
Can you provide a flow chart?

淡淡烟草味淡淡烟草味2785 days ago461

reply all(3)I'll reply

  • PHP中文网

    PHP中文网2017-05-16 16:58:39

    The service provider should be triggered the first time you access it, the first time you access it through the container

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-16 16:58:39

    Service provider is a startup program. It first registers the class into the ioc container, and then loads some other things (optional);
    For details, please see Service Provider

    reply
    0
  • 某草草

    某草草2017-05-16 16:58:39

    I understand that it is triggered during injection, that is, in the constructor of the callee. I don’t know if it’s right or not.

    reply
    0
  • Cancelreply