config/providers.py
file, you will find a PROVIDERS
list which contains all the Service Providers involved in building the framework.app/providers/DashboardProvider.py
. This new Service Provider will have two simple methods, a register
method and a boot
method. We'll explain both in detail.User
model into the container. There are three key features we have to go into detail here.register
method, it's important that we only bind things into the container. When the provider is first registered to the container, the register method is ran and your classes will be registered to the container.This will be exactly the same as above. Notice that theboot
method is resolved by the container.
PROVIDERS
list. This is likely in your config/providers.py
file: