boot method

Future<void> boot()

Bootstrap any application services.

This method is called AFTER all providers have been registered, so you can safely resolve any service here.

Override this method to perform any initialization that depends on other services being available.

@override
void boot() {
  final config = app.make<Config>('config');
  final mailer = app.make<Mailer>('mailer');
  mailer.setDefaultFrom(config.get('mail.from'));
}

Implementation

Future<void> boot() async {
  // Default implementation does nothing.
  // Override in subclasses if needed.
}