Register the support mailer

@return void
496427
protected function registerSupportedMailer()
    {
        $this->app->singleton('antares.support.mail', function ($app) {
            $this->registerSwiftMailer();

            $mailer = new Mailer(
                    $app->make('view'), $app->make('antares.swift.mailer'), $app->make('events')
            );
            if ($app->bound('queue')) {
                $mailer->setQueue($app->make('queue'));
            }
            $from   = $app->make('antares.memory')->make('primary')->get('email.from');
            $config = $app->make('config')->get('mail.from');


            $mailer->alwaysFrom(array_get($from, 'address', array_get($config, 'address')), array_get($from, 'name', array_get($config, 'name')));

            $to = $app->make('config')->get('mail.to');

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

            return $mailer;
        });
    }
575741
public function register()
    {
        /*
         * Register the e-mail checker
         */
        $this->app->singleton(EmailChecker::class, function ($app) {
            return new EmailChecker();
        });

        /*
         * Alias the dependency for ease.
         */
        $this->app->alias(EmailChecker::class, 'email.checker');
    }
742797
protected function register()
    {
        // Make posttype model for the factory.
        $this->setModel($this->makePosttypeModel());

        // Build posttype with model.
        $this->setSingularity($this->makePosttypeInstance());

        // Set columns to the posttype, after admin init.
        if ($this->methodExist('columns')) {
            $this->registerColumns();
        }

        // Set posttype post templates.
        if ($this->methodExist('templates')) {
            $this->registerTemplates();
        }
    }
915648
public function registerSwiftMailer()
    {
        if ($this->app['config']['mail.driver'] != 'debug') {
            parent::registerSwiftMailer();

            return;
        }

        $this->app->singleton('swift.mailer', function ($app) {
            return new Swift_Mailer(
                new DebugTransport(
                    $app->make(MailDebugManager::class)
                )
            );
        });
    }
161552
public function registerHttpServiceProvider()
    {
        $this->registerRateLimiting();
        $this->registerHttpValidation();
        $this->registerHttpParsers();
        $this->registerResponseFactory();
        $this->registerMiddleware();
    }
811628
public function register()
    {
        if (!defined('ADMINLTETEMPLATE_PATH')) {
            define('ADMINLTETEMPLATE_PATH', realpath(__DIR__.'/../../'));
        }

        if ($this->app->runningInConsole()) {
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTE::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTEAlt::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebar::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\PublishAdminLTESidebarAlt::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeAdminUserSeeder::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdmin::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEAdminAlt::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeView::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenu::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\AdminLTEMenuAlt::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeRoute::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeMenu::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeV::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeVC::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\MakeMVC::class]);
            $this->commands([\Acacha\AdminLTETemplateLaravel\Console\Username::class]);
        }

        $this->app->bind('AdminLTE', function () {
            return new \Acacha\AdminLTETemplateLaravel\AdminLTE();
        });

        if (config('adminlte.gravatar', true)) {
            $this->registerGravatarServiceProvider();
        }

        if (config('adminlte.guestuser', true)) {
            $this->registerGuestUserProvider();
        }
        if (config('auth.providers.users.field', 'email') === 'username'  &&
            config('adminlte.add_nullable_username', true)) {
            $this->loadMigrationsFrom(ADMINLTETEMPLATE_PATH .'/database/migrations/username_login');
        }
    }
121481
protected function registerMailjetNewService(){

        $this->app->bind('designpond\newsletter\Newsletter\Worker\MailjetServiceInterface', function()
        {
            return new \designpond\newsletter\Newsletter\Worker\MailjetService(
                new \Mailjet\Client(config('newsletter.mailjet.api'),config('newsletter.mailjet.secret')),
                new \Mailjet\Resources()
            );
        });
    }
1080271
public function register()
    {
        $this->app->singleton('mitul.generator.publish', function ($app) {
            return new PublisherCommand();
        });

        $this->app->singleton('mitul.generator.api', function ($app) {
            return new APIGeneratorCommand();
        });

        $this->app->singleton('mitul.generator.scaffold', function ($app) {
            return new ScaffoldGeneratorCommand();
        });

        $this->app->singleton('mitul.generator.scaffold_api', function ($app) {
            return new ScaffoldAPIGeneratorCommand();
        });

        $this->commands([
            'mitul.generator.publish',
            'mitul.generator.api',
            'mitul.generator.scaffold',
            'mitul.generator.scaffold_api',
        ]);
    }
416439
function registerSwiftMailer()
    {
        if ($this->app['config']['mail.driver'] == 'preview' || $this->app['config']['mail.preview'] == true) {
            $this->registerPreviewSwiftMailer();
        } else {
            parent::registerSwiftMailer();
        }
    }
9101
public function register() {
        $configPath = __DIR__ . '/../config/backup-manager.php';
        $this->mergeConfigFrom($configPath, 'backup-manager');
        $this->registerFilesystemProvider();
        $this->registerDatabaseProvider();
        $this->registerCompressorProvider();
        $this->registerShellProcessor();
        $this->registerArtisanCommands();
    }
491361
protected function registerFormHelper()
    {
        $this->app->singleton('laravel-form-helper', function ($app) {

            $configuration = $app['config']->get('laravel-form-builder');

            return new FormHelper($app['view'], $app['translator'], $configuration);
        });

        $this->app->alias('laravel-form-helper', 'Kris\LaravelFormBuilder\FormHelper');
    }
926783
public function register()
    {
        $this->app->bind('Mailjet\LaravelMailjet\Contracts\TemplateServiceContract',
            function($app) {
            $config  = $this->app['config']->get('services.mailjet', array());
            $call    = $this->app['config']->get('services.mailjet.common.call',true);
            $options = $this->app['config']->get('services.mailjet.common.options', array());
            $mailjetService=new MailjetService($config['key'], $config['secret'], $call,$options);
            return new TemplateService($mailjetService);
        });
    }
370808
public function register()
	{
		$app = $this->app ?: app();
		$app_version = method_exists($app, 'version') ? $app->version() : $app::VERSION;

		if ( version_compare( $app_version, '5.0', '<' ) )
		{
			$this->is_laravel_5 = false;
		}

		$this->app->singleton('laravel-swiftmailer.mailer', function($app)
		{
			/** @var \Illuminate\Foundation\Application $app */
			$mailer = new Mailer( $app->make('mailer') );

			if ( $app->bound('queue') )
			{
				$this->is_laravel_5 ? $mailer->setQueue($app['queue.connection']) : $mailer->setQueue($app['queue']);
			}

			return $mailer;
		} );
	}
313278
public function register()
    {
        $this->mergeConfigFrom(
            __DIR__.'/config/newsletter.php', 'newsletter'
        );

        // Custom Facade for CampagneWorker
        $this->app['newsworker'] = $this->app->share(function ()
        {
            return $this->app->make('\designpond\newsletter\Newsletter\Worker\CampagneInterface');
        });

        $this->registerMailjetService();
        $this->registerMailjetNewService();
        $this->registerNewsletterService();
        $this->registerContentService();
        $this->registerTypesService();
        $this->registerCampagneService();
        $this->registerCampagneWorkerService();
        $this->registerInscriptionService();
        $this->registerSubscribeService();
        $this->registerImportService();
        $this->registerUploadService();
        $this->registerListService();
        $this->registerEmailService();
        $this->registerClipboardService();
        $this->registerSubscribeWorkerService();
    }
13620
public function register()
    {
        //register commands
        $this->commands([
            Commands\HelperMakeCommand::class,
        ]);

        //include the active package helpers
        foreach (config('helpers.package_helpers', []) as $activeHelper) {

            $file = __DIR__ . '/Helpers/' . $activeHelper . '.php';

            if (file_exists($file)) {
                require_once($file);
            }
        }

        //load custom helpers with a mapper
        if (count(config('helpers.custom_helpers', []))) {

            foreach (config('helpers.custom_helpers', []) as $customHelper) {

                $file = app_path() . '/' . $this->getHelpersDirectory() . '/' . $customHelper . '.php';

                if(file_exists($file)) {
                    require_once($file);
                }
            }
        }

        //load custom helpers automatically
        else {

            //include the custom helpers
            foreach (glob(app_path() . '/' . $this->getHelpersDirectory() . '/*.php') as $file) {
                require_once($file);
            }
        }
    }
437203
public function register()
    {
        $this->mergeConfigFrom( __DIR__.'/../config/config.php', $this->packageName);

        \Gate::before(function ($user, $ability, $arguments) {
            $class = config($this->packageName.'.rbacClass');
            $rbac = new $class();
            return $rbac->checkPermission($user, $ability, $arguments);
        });

        $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) {
            $bladeCompiler->directive('role', function ($roles) {
                return "<?php if(auth()->check() && in_array(auth()->user()->role, explode('|', $roles))): ?>";
            });
            $bladeCompiler->directive('endrole', function () {
                return '<?php endif; ?>';
            });
        });
    }
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;
        });
    }