A
A
avvva2015-08-14 11:07:48
Laravel
avvva, 2015-08-14 11:07:48

Why boot method in Service Provider?

In Laravel, when creating a service provider, you can define a wonderful boot method , but I just can’t figure out why it might come in handy?
Please provide examples of use in real applications

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
D', 2015-08-14
@Denormalization

There is a whole section in the documentation .
This method is called after all other service providers have been registered.
Therefore, it can do everything that needs to be done at the start of the system, and that requires the presence of other service providers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question