class AppServiceProvider extends ServiceProvider (View source)

Registers application services and dependencies.

Specifically, it configures PHPMailer and binds EmailService to the container.

Methods

void
register()

Register any application services.

void
boot()

Bootstrap any application services.

Details

void register()

Register any application services.

This method binds PHPMailer as a singleton in the container with SMTP configuration from the app config, and also binds the EmailService as a singleton, injecting PHPMailer into it.

Return Value

void

void boot()

Bootstrap any application services.

Return Value

void