What is service providers in Laravel?
In Laravel, service providers are the center of overall Laravel application bootstrapping. User applications, as well as core services of Laravel, are bootstrapped with service providers. These powerful tools are used by developers to manage class dependencies and perform dependency injection. To create a service provider, we have to use the below-mentioned artisan command.
You can use
php artisan make: provider ClientsServiceProvider artisan command to generate a service provider :
It has below listed functions in its file.
- register function
- boot function
Suggest An Answer
Routing service provider, session -cookie- auth also be provider