What are service providers in Laravel ?

Member

dejon

by dejon , in category: Technology , 2 months ago

What are service providers in Laravel ?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by oda.tromp , 2 months ago

Service Providers are central place where all laravel application is bootstrapped . Your application as well all Laravel core services are also bootstrapped by service providers.

All service providers extend the Illuminate\Support\ServiceProvider class. Most service providers contain a register and a boot method. Within the register method, you should only bind things into the service container. You should never attempt to register any event listeners, routes, or any other piece of functionality within the register method.