Boots the Swiftmailer Service Provider
354507
protected function bootSwiftmailer()
    {
        $this->register(new \Silex\Provider\SwiftmailerServiceProvider(), array(
                'swiftmailer.use_spool' => false,
                'swiftmailer.options' => array(
                        'host' => $this['smtp.host'],
                        'port' => $this['smtp.port'],
                        'username' => $this['smtp.username'],
                        'password' => $this['smtp.password'],
                        'encryption' => $this['smtp.encryption'],
                        'auth_mode' => $this['smtp.auth_mode']
                    )
            ));
    }
16717
public function boot()
    {
        $this->registerHelpers();

        $this->loadViewsFrom(__DIR__ . '/Views', 'sweetalert');

        $this->publishes(
            [
                __DIR__ . '/Views' => resource_path('views/vendor/sweetalert'),
            ]
        );

        $this->publishes([
           __DIR__.'/js' => public_path('vendor/sweetalert'),
        ], 'public');
    }
446526
function boot() {
  if (config === null) {
    // TODO [NSTDFRZN] Be sure nested objects are frozen too
    config = Object.freeze(gatherConfigFromEnv());
  }

  ee.emitAsync('booting_backing')
    .then(() => {
      ee.emit('booting');
      ee.emit('booted');
    })
    .catch((err) => {
      ee.emit('error', err); // TODO [ERR2BTERR] Maybe err -> BootError(err)
    });
}
299823
public function boot()
    {
        $path = __DIR__ . '/../resources/lang/en/exceptionmessages.php';

        $this->publishes([
            $path => resource_path("lang/vendor/{$this->namespace}/en/exceptionmessages.php"),
        ]);

        $this->loadTranslationsFrom($path, $this->namespace);
    }
110525
public function boot()
    {
        $required_providers = [
            ExtendedValidatorServiceProvider::class,
            StaticReferencesServiceProvider::class,
        ];

        foreach ($required_providers as $required_provider) {
            if (! $this->serviceProviderIsRegistered($required_provider)) {
                $this->app->register($required_provider);
            }
        }
    }
49009
public function boot()
    {
        // mysql (Specified key was too long)
        Schema::defaultStringLength(191);

        $appPath = __DIR__ . DIRECTORY_SEPARATOR;
        $basePath = $appPath . ".." . DIRECTORY_SEPARATOR;
        $migrationsPath = $basePath . "database" . DIRECTORY_SEPARATOR . "migrations";
        $viewsPath = $basePath . "resources" . DIRECTORY_SEPARATOR . "views";

        // merge config
        $configPath = $basePath . '/config/config.php';
        $this->mergeConfigFrom($configPath, 'titan');

        // load migrations
        $this->loadMigrationsFrom($migrationsPath);

        $this->loadViewsFrom($viewsPath, "titan");

        $this->registerCommand(SetupCommand::class, 'setup');
        $this->registerCommand(InstallCommand::class, 'install');
        $this->registerCommand(PublishCommand::class, 'publish');
        $this->registerCommand(DatabaseSeedCommand::class, 'db:seed');

        // register RouteServiceProvider
        //$this->app->register('Bpocallaghan\Titan\Providers\RouteServiceProvider');

        // register EventServiceProvider
        $this->app->register('Bpocallaghan\Titan\Providers\EventServiceProvider');

        // register HelperServiceProvider
        $this->app->register('Bpocallaghan\Titan\Providers\HelperServiceProvider');
    }
1066373
protected function registerSwiftMailer()
    {
        $this->registerSwiftTransport();
        $this->mailer = $this->getDI()->get('\Swift_Mailer', [$this->transport]);
    }
502972
async function bootTymly (options, messages) {
  const loadedComponents = loadComponents(
    options,
    messages
  )

  preBootTymlyRefResolution(
    loadedComponents,
    messages
  )

  const parsedServices = parseServices(
    loadedComponents,
    messages
  )

  const bootedServices = await bootServices(
    parsedServices,
    loadedComponents,
    options,
    messages
  )

  await postBootTymlyRefResolution(
    loadedComponents,
    bootedServices,
    messages
  )

  return bootedServices
}
16061
public function boot()
    {
        $configPath = __DIR__ . '/../config/debugbar.php';
        $this->publishes([$configPath => $this->getConfigPath()], 'config');

        $routeConfig = [
            'namespace' => 'Barryvdh\Debugbar\Controllers',
            'prefix' => $this->app['config']->get('debugbar.route_prefix'),
            'domain' => $this->app['config']->get('debugbar.route_domain'),
            'middleware' => [DebugbarEnabled::class],
        ];

        $this->getRouter()->group($routeConfig, function($router) {
            $router->get('open', [
                'uses' => 'OpenHandlerController@handle',
                'as' => 'debugbar.openhandler',
            ]);

            $router->get('clockwork/{id}', [
                'uses' => 'OpenHandlerController@clockwork',
                'as' => 'debugbar.clockwork',
            ]);

            $router->get('telescope/{id}', [
                'uses' => 'TelescopeController@show',
                'as' => 'debugbar.telescope',
            ]);
            
            $router->get('assets/stylesheets', [
                'uses' => 'AssetController@css',
                'as' => 'debugbar.assets.css',
            ]);

            $router->get('assets/javascript', [
                'uses' => 'AssetController@js',
                'as' => 'debugbar.assets.js',
            ]);

            $router->delete('cache/{key}/{tags?}', [
                'uses' => 'CacheController@delete',
                'as' => 'debugbar.cache.delete',
            ]);
        });

        $this->registerMiddleware(InjectDebugbar::class);
    }
440179
public function boot()
    {
        $this->loadViewsFrom(__DIR__.'/Views', 'laralum_pdf');
        $this->loadTranslationsFrom(__DIR__.'/Translations', 'laralum_pdf');

        if (!$this->app->routesAreCached()) {
            require __DIR__.'/Routes/web.php';
        }

        $this->app->register('Barryvdh\\DomPDF\\ServiceProvider');
        $this->app->register('GrahamCampbell\\Markdown\\MarkdownServiceProvider');

        if (!file_exists(storage_path('fonts'))) {
            mkdir(storage_path('fonts'));
        }
    }
1143926
protected function registerPostmarkMailer()
    {
        $postmark = $this->app['config']->get('services.postmark', []);

        $this->app->singleton('swift.mailer', function ($app) use ($postmark) {
            return new Swift_Mailer(
                new Swift_PostmarkTransport($postmark['api_key'])
            );
        });
    }
807938
protected function registerMailer(): void
    {
        $this->app->singleton('orchestra.mail', function ($app) {
            $mailer = new Mailer($app, $transport = new TransportManager($app));

            if ($app->bound('orchestra.platform.memory')) {
                $mailer->attach($memory = $app->make('orchestra.platform.memory'));
                $transport->setMemoryProvider($memory);
            }

            if ($app->bound('queue')) {
                $mailer->setQueue($app->make('queue'));
            }

            return $mailer;
        });
    }
318574
public function register()
    {
        $me = $this;

        $this->app->bindShared('mailer', function($app) use ($me)
        {
            $me->registerSwiftMailer();

            // Once we have create the mailer instance, we will set a container instance
            // on the mailer. This allows us to resolve mailer classes via containers
            // for maximum testability on said classes instead of passing Closures.
            $mailer = new Mailer(
                $app['view'], $app['swift.mailer'], $app['events']
            );

            $this->setMailerDependencies($mailer, $app);

            // If a "from" address is set, we will set it on the mailer so that all mail
            // messages sent by the applications will utilize the same "from" address
            // on each one, which makes the developer's life a lot more convenient.
            $from = $app['config']['mail.from'];

            if (is_array($from) && isset($from['address'])) {
                $mailer->alwaysFrom($from['address'], $from['name']);
            }

            // Here we will determine if the mailer should be in "pretend" mode for this
            // environment, which will simply write out e-mail to the logs instead of
            // sending it over the web, which is useful for local dev environments.
            $pretend = $app['config']->get('mail.pretend', false);

            $mailer->pretend($pretend);

            return $mailer;
        });
    }
569064
public static function create()
    {
        $builder = NotifireBuilder::create();

        if (\class_exists('Swift_Mailer')) {
            $transport = new \Swift_SmtpTransport('localhost', 25);
            $mailer = new \Swift_Mailer($transport);

            $handler = new SwiftMailerHandler($mailer, 'default');
            if (\class_exists('Twig_Environment')) {
                $env = new \Twig_Environment(new \Twig_Loader_Filesystem());
                $handler->setTwig($env);
            }

            $builder->addHandler($handler);
            $builder->addNotification('email', Email::class);
        }

        $builder->initialize();
    }
1259199
public function boot()
    {
        // LOAD THE VIEWS
        // - first the published/overwritten views (in case they have any changes)
        $this->loadViewsFrom(resource_path('views/vendor/backpack/langfilemanager'), 'langfilemanager');
        // - then the stock views that come with the package, in case a published view might be missing
        $this->loadViewsFrom(realpath(__DIR__.'/resources/views'), 'langfilemanager');

        // $this->loadTranslationsFrom(realpath(__DIR__.'/resources/lang'), 'backpack');

        // publish config file
        $this->publishes([__DIR__.'/config/backpack/langfilemanager.php' => config_path('backpack/langfilemanager.php')], 'config');
        // publish views
        $this->publishes([__DIR__.'/resources/views' => resource_path('views/vendor/backpack/langfilemanager')], 'views');
        // publish lang files
        $this->publishes([__DIR__.'/resources/lang' => resource_path('lang/vendor/backpack')], 'lang');

        // publish the migrations and seeds
        $this->publishes([__DIR__.'/database/migrations/' => database_path('migrations')], 'migrations');

        // use the vendor configuration file as fallback
        $this->mergeConfigFrom(__DIR__.'/config/backpack/langfilemanager.php', 'langfilemanager');
    }
978692
public function boot()
    {
        // Set response static instances
        $this->setResponseStaticInstances();

        // Configure the "Accept"-header parser
        DingoHttpRequest::setAcceptParser($this->app['Dingo\Api\Http\Parser\Accept']);

        // Rebind API router
        $this->app->rebinding('api.routes', function ($app, $routes) {
            $app['api.url']->setRouteCollections($routes);
        });

        // Initiate HTTP kernel
        $kernel = $this->app->make('Illuminate\Contracts\Http\Kernel');

        /// Add middlewares to HTTP request
        $this->app[NodesHttpMiddlewareRequest::class]->mergeMiddlewares(
            $this->gatherAppMiddleware($kernel)
        );

        // Prepend request middleware
        $this->addRequestMiddlewareToBeginning($kernel);

        // Replace route dispatcher
        $this->app['events']->listen(DingoEventRequestWasMatched::class, function (DingoEventRequestWasMatched $event) {
            $this->replaceRouteDispatcher();
            $this->updateRouterBindings();
        });

        // Load project routes
        $this->loadRoutes();

        // Register namespace for API views
        $this->loadViewsFrom(__DIR__.'/../resources/views', 'nodes.api');

        // Register publish groups
        $this->publishGroups();
    }
670338
public function boot()
    {
        if ($this->isLaravelVersion('4'))
        {
            $this->package('msurguy/honeypot');
        }
        elseif ($this->isLaravelVersion('5'))
        {
            $this->loadTranslationsFrom(__DIR__ . '/../../lang', 'honeypot');
        }

        $this->app->booted(function($app) {

            // Get validator and translator
            $validator = $app['validator'];
            $translator = $app['translator'];

            // Add honeypot and honeytime custom validation rules
            $validator->extend('honeypot', 'honeypot@validateHoneypot', $translator->get('honeypot::validation.honeypot'));
            $validator->extend('honeytime', 'honeypot@validateHoneytime', $translator->get('honeypot::validation.honeytime'));

        });
    }