Register the search builder class.

@return void
181043
public function registerSearchBuilder()
    {
        $this->app->singleton('searchy', function (Container $app) {
            $config = $app['config'];

            return new SearchBuilder($config);
        });

        $this->app->alias('searchy', SearchBuilder::class);
    }
1042290
protected function registerFieldBuilder()
    {
        $this->app->bind('field', function ($app) {

            $this->loadConfigurationOptions();

            $fieldBuilder = new FieldBuilder(
                $app['form'],
                $this->theme,
                $app['translator']
            );

            if ($this->options['control_access']) {
                $fieldBuilder->setAccessHandler($app[AccessHandler::class]);
            }

            $fieldBuilder->setAbbreviations($this->options['abbreviations']);

            if (isset ($this->options['theme_values']['field_classes'])) {
                $fieldBuilder->setCssClasses(
                    $this->options['theme_values']['field_classes']
                );
            }

            if (isset ($this->options['theme_values']['field_templates'])) {
                $fieldBuilder->setTemplates(
                    $this->options['theme_values']['field_templates']
                );
            }

            $fieldBuilder->setSessionStore($app['session.store']);

            return $fieldBuilder;
        });
    }
1125884
public function register()
    {
        $this->app->bindShared('db.factory', function($app)
        {
            return new ConnectionFactory($app);
        });

        $this->app->bindShared('db', function($app)
        {
            return new DatabaseManager($app, $app['db.factory']);
        });
    }
1016093
protected function registerAntaresFormBuilder()
    {
        $this->app->singleton('Antares\Contracts\Html\Form\Control', 'Antares\Html\Form\Control');

        $this->app->singleton('Antares\Contracts\Html\Form\Template', function ($app) {
            $class = $app->make('config')->get('antares/html::form.presenter', 'Antares\Html\Form\BootstrapThreePresenter');

            return $app->make($class);
        });

        $this->app->singleton('antares.form', function ($app) {
            return new FormFactory($app);
        });
    }
1310759
public function register()
    {
        // Register main classes
        $this->app->make('Laraveldaily\Quickadmin\Controllers\QuickadminController');
        $this->app->make('Laraveldaily\Quickadmin\Controllers\UserActionsController');
        $this->app->make('Laraveldaily\Quickadmin\Controllers\QuickadminMenuController');
        $this->app->make('Laraveldaily\Quickadmin\Cache\QuickCache');
        $this->app->make('Laraveldaily\Quickadmin\Builders\MigrationBuilder');
        $this->app->make('Laraveldaily\Quickadmin\Builders\ModelBuilder');
        $this->app->make('Laraveldaily\Quickadmin\Builders\RequestBuilder');
        $this->app->make('Laraveldaily\Quickadmin\Builders\ControllerBuilder');
        $this->app->make('Laraveldaily\Quickadmin\Builders\ViewsBuilder');
        $this->app->make('Laraveldaily\Quickadmin\Events\UserLoginEvents');
        // Register dependency packages
        $this->app->register('Collective\Html\HtmlServiceProvider');
        $this->app->register('Intervention\Image\ImageServiceProvider');
        $this->app->register('Yajra\Datatables\DatatablesServiceProvider');
        // Register dependancy aliases
        $loader = \Illuminate\Foundation\AliasLoader::getInstance();
        $loader->alias('HTML', 'Collective\Html\HtmlFacade');
        $loader->alias('Form', 'Collective\Html\FormFacade');
        $loader->alias('Image', 'Intervention\Image\Facades\Image');
        $loader->alias('Datatables', 'Yajra\Datatables\Datatables');
    }
1032755
public function register()
    {
        $this->registerLoader();

        $this->app->singleton('webklex.translator', function ($app) {
            return new Translator($app['webklex.translator.loader'], $app->getLocale());
        });
    }
981901
public function register()
	{
		$logger = new Writer(
			new Logger($this->app['env']), $this->app['events']
		);

		$this->app->instance('log', $logger);

		// If the setup Closure has been bound in the container, we will resolve it
		// and pass in the logger instance. This allows this to defer all of the
		// logger class setup until the last possible second, improving speed.
		if (isset($this->app['log.setup']))
		{
			call_user_func($this->app['log.setup'], $logger);
		}
	}
230676
public function register()
    {
        $this->registerLoader();

        $this->app->singleton('translator', function ($app) {

            $loader = $app['translation.loader'];

            // When registering the translator component, we'll need to set the default
            // locale as well as the fallback locale.
            $locale = TransHelper::getLanguage();

            $trans = new \Netcore\Translator\Translator($loader, $locale);

            $trans->setFallback($app['config']['app.fallback_locale']);

            return $trans;
        });

        // Views
        $viewNamespace = 'translations';
        $this->loadViewsFrom(__DIR__.'/views', $viewNamespace);

        // Default config
        $this->mergeConfigFrom(
            __DIR__.'/config/translations.php',
            'translations'
        );

        // Publish config to override defaults
        $this->publishes([
            __DIR__.'/config/translations.php' => config_path('translations.php'),
        ], 'config');

        // Migrations
        $this->loadMigrationsFrom(__DIR__.'/migrations');

        // View composers
        view()->composer($viewNamespace.'::*', function(View $view) use ($viewNamespace) {
            $view->with(compact('viewNamespace'));
        });

        view()->composer($viewNamespace.'::languages.*', function(View $view) {
            $uiTranslations = config('translations.ui_translations.languages', []);
            $view->with(compact('uiTranslations'));
        });

        view()->composer($viewNamespace.'::translations.*', function(View $view) {
            $uiTranslations = config('translations.ui_translations.translations', []);
            $view->with(compact('uiTranslations'));
        });

        view()->composer($viewNamespace.'::partials.*', function(View $view) {
            $uiTranslations = config('translations.ui_translations.partials', []);
            $view->with(compact('uiTranslations'));
        });

        // Commands
        $this->commands([
            DownloadTranslations::class
        ]);

        Blade::directive('lg', function ($expression) {
            return "<?php echo lg($expression); ?>";
        });

        // Global helpers
        require_once __DIR__ . '/Helpers/Global.php';
    }
193339
public function register()
    {
        $this->registerCommands();

        if (file_exists(base_path('config/larasearch.php')))
        {
            $this->mergeConfigFrom(base_path('config/larasearch.php'), 'larasearch');
        }
        else
        {
            $this->mergeConfigFrom(__DIR__ . '/../../config/larasearch.php', 'larasearch');
        }
    }
530708
public function register()
	{
		$this->app['db'] = function($app)
		{
			// @FIXME: this isn't pretty, but it will shim the removal of the old mysql_* calls from php
			$driver = (Config::get('dbtype') == 'mysql') ? 'pdo' : Config::get('dbtype');

			$options = [
				'driver'   => $driver,
				'host'     => Config::get('host'),
				'user'     => Config::get('user'),
				'password' => Config::get('password'),
				'database' => Config::get('db'),
				'prefix'   => Config::get('dbprefix')
			];

			return Driver::getInstance($options);
		};
	}
705399
public function register()
    {
        $app = $this->app;

        // register spec path for app
        $app['path.specs'] = $app->basePath().'/resources/specs';

        // register spec repository
        $app->singleton('specs', function ($app) {
            $loader = new Repository\FileLoader($app['files'], $app['path.specs']);

            return new Repository\NamespacedRepository($loader);
        });

        // register addon environment
        $app->instance('addon', $this->addonEnvironment = new AddonEnvironment($app));
        $app->alias('addon', AddonEnvironment::class);

        // register addon generator
        $app->singleton('addon.generator', function ($app) {
            return new AddonGenerator();
        });
        $app->alias('addon.generator', AddonGenerator::class);

        // register database migrator
        $app->singleton('database.migrator', function ($app) {
            return new Migrator($app['db'], $app['config']);
        });
        $app->alias('database.migrator', Migrator::class);

        $app['events']->fire(new AddonWorldCreated($this->addonEnvironment));

        $this->registerClassResolvers();

        (new AddonRegistrar)->register($app, $this->addonEnvironment->addons());

        $app['events']->fire(new AddonRegistered($this->addonEnvironment));
    }
140618
public function registerHamlCompiler() {

		// Add resolver
		$this->app['view.engine.resolver']->register('haml', function() {
			return new CompilerEngine($this->app['Bkwld\LaravelHaml\HamlCompiler']);
		});

		// Add extensions
		$this->app['view']->addExtension('haml', 'haml');
		$this->app['view']->addExtension('haml.php', 'haml');
	}
297625
public function register()
    {
        $this->registerHtmlBuilder();

        $this->registerFormBuilder();

        $this->app->alias('html', 'Collective\Html\HtmlBuilder');
        $this->app->alias('form', 'Rokde\LaravelBootstrap\Html\BootstrapFormBuilder');
    }
309874
public function register()
    {
        $configPath = __DIR__ . '/../config/sql-logging.php';
        $this->mergeConfigFrom($configPath, 'sql-logging');

        if (config('sql-logging.log', false)) {
            Event::listen('illuminate.query',
                function ($query, $bindings, $time) {
                    $data = compact('bindings', 'time');

                    // Format binding data for sql insertion
                    foreach ($bindings as $i => $binding) {
                        if ($binding instanceof \DateTime) {
                            $bindings[$i] = $binding->format('\'Y-m-d H:i:s\'');
                        } else if (is_string($binding)) {
                            $bindings[$i] = "'$binding'";
                        }
                    }

                    // Insert bindings into query
                    $query = str_replace(array('%', '?'), array('%%', '%s'), $query);
                    $query = vsprintf($query, $bindings);

                    $log = new Logger('sql');
                    $log->pushHandler(new StreamHandler(storage_path() . '/logs/sql-' . date('Y-m-d') . '.log',
                        Logger::INFO));

                    // if log request data
                    if (config('sql-logging.log_request', false)) {
                        $data['request_path'] = Request::path();
                        $data['request_method'] = Request::method();
                        $data['request_data'] = Request::all();
                    }

                    // add records to the log
                    $log->addInfo($query, $data);
                });
        }
    }
267924
protected function registerFormBuilder()
    {
        $this->app->bindShared('bootstrap-form', function($app)
        {
            $form = new FormBuilder($app['bootstrap-html'], $app['url'], $app['session.store']->getToken(), $app['view']);

            return $form->setSessionStore($app['session.store']);
        });
    }
223474
public function register()
    {
        $this->registerExecutor();
        $this->registerProfileBuilder();
        $this->registerProfileRegistry();
        $this->registerMysqlDumpSource();
        $this->registerBackup();
    }
648655
public function register()
    {
        $this->app->singleton('view', function($app)
        {
            // Next we need to grab the engine resolver instance that will be used by the
            // environment. The resolver will be used by an environment to get each of
            // the various engine implementations such as plain PHP or Blade engine.
            $resolver = $app['view.engine.resolver'];

            $finder = $app['view.finder'];

            $env = new LayoutView($resolver, $finder, $app['events']);

            // We will also set the container instance on this view environment since the
            // view composers may be classes registered in the container, which allows
            // for great testable, flexible composers for the application developer.
            $env->setContainer($app);

            $env->share('app', $app);

            return $env;
        });
    }