Register the form builder instance.

@return void
182240
protected function registerDataGrid()
    {
        $this->app->singleton('datagrid', function ($app) {
            $request = $app->request;

            return new Manager($request);
        });
    }
165209
public function register()
    {
        $this->instance = register_post_type($this->slug, $this->getArguments());
        $this->registerStatus();
    }
515599
protected function register()
    {
        // Setup taxonomy relationships.
        $this->relation();

        // Make taxonomy model for the factory.
        $this->setModel($this->makeTaxonomyModel());

        // Build taxonomy with model and singularity holders.
        $this->setSingularity($this->makeTaxonomyInstance());

        // Set fields to the taxonomy.
        if ($this->methodExist('fields')) {
            $this->registerFields();
        }

        // Set columns to the taxonomy, after admin init.
        if ($this->methodExist('columns')) {
            $this->registerColumns();
        }
    }
438913
public function register()
    {
        $this->commands('LarsJanssen\UnderConstruction\Commands\SetCodeCommand');
        $this->mergeConfigFrom(__DIR__.'/../config/under-construction.php', 'under-construction');

        $this->app->bind('TransFormer', function ($app) {
            return new TransFormer();
        });

        $routeConfig = [
            'namespace'  => 'LarsJanssen\UnderConstruction\Controllers',
            'prefix'     => 'under',
            'middleware' => [
                'web',
            ],
        ];

        $this->getRouter()->group($routeConfig, function ($router) {
            $router->post('check', [
                'uses' => 'CodeController@check',
                'as'   => 'underconstruction.check',
            ]);

            $router->post('checkiflimited', [
                'uses' => 'CodeController@checkIfLimited',
                'as' => 'underconstruction.checkiflimited',
            ]);

            $router->get('construction', [
                'uses' => 'CodeController@index',
                'as'   => 'underconstruction.index',
            ]);

            $router->get('js', [
                'uses' => 'AssetController@js',
                'as'   => 'underconstruction.js',
            ]);
        });
    }
103545
public function register()
    {
        $this->mergeConfigFrom(
            __DIR__.'/../config/config.php', 'translatable-bootforms'
        );

        // Override BootForm's form builder in order to get model binding
        // between BootForm & TranslatableBootForm working.
        $this->app->singleton('typicms.form', function ($app) {
            $formBuilder = new FormBuilder();
            $formBuilder->setLocales($this->getLocales());
            $formBuilder->setErrorStore($app['typicms.form.errorstore']);
            $formBuilder->setOldInputProvider($app['typicms.form.oldinput']);
            $formBuilder->setToken($app['session.store']->token());

            return $formBuilder;
        });

        // Define TranslatableBootForm.
        $this->app->singleton('translatable-bootform', function ($app) {
            $form = new TranslatableBootForm($app['bootform']);
            $form->locales($this->getLocales());

            return $form;
        });
    }
213705
public function register()
    {
        $this->app->singleton('command.rocket.generate.from-mwb', function ($app) {
            return new GenerateFromMWB($app['config'], $app['files'], $app['view']);
        });

        $this->app->singleton('command.rocket.generate.api.from-oas', function ($app) {
            return new GenerateAPIFromOAS($app['config'], $app['files'], $app['view']);
        });

        $this->app->singleton('command.rocket.validate.from-mwb', function ($app) {
            return new ValidatorFromMWB($app['config'], $app['files'], $app['view']);
        });

        $this->app->singleton('command.rocket.make.service', function ($app) {
            return new ServiceGenerator($app['config'], $app['files'], $app['view']);
        });

        $this->app->singleton('command.rocket.make.helper', function ($app) {
            return new HelperGenerator($app['config'], $app['files'], $app['view']);
        });

        $this->app->singleton('command.rocket.make.migration', function ($app) {
            return new MigrationGenerator($app['config'], $app['files'], $app['view']);
        });

        $this->app->singleton('command.rocket.make.model', function ($app) {
            return new ModelGenerator($app['config'], $app['files'], $app['view']);
        });

        $this->app->singleton('command.rocket.make.repository', function ($app) {
            return new RepositoryGenerator($app['config'], $app['files'], $app['view']);
        });

        $this->app->singleton('command.rocket.make.crud.admin', function ($app) {
            return new AdminCRUDGenerator($app['config'], $app['files'], $app['view']);
        });

        $this->app->singleton('command.rocket.validate', function ($app) {
            return new Validate($app['config'], $app['files'], $app['view']);
        });

        $this->app->singleton('command.rocket.make.event', function ($app) {
            return new EventGenerator($app['config'], $app['files'], $app['view']);
        });

        $this->app->singleton('command.rocket.make.api.admin', function ($app) {
            return new AdminAPIGenerator($app['config'], $app['files'], $app['view']);
        });

        $this->commands(
            'command.rocket.generate.from-mwb'
        );

        $this->commands(
            'command.rocket.generate.api.from-oas'
        );

        $this->commands(
            'command.rocket.make.service'
        );

        $this->commands(
            'command.rocket.make.helper'
        );

        $this->commands(
            'command.rocket.make.migration'
        );

        $this->commands(
            'command.rocket.make.model'
        );

        $this->commands(
            'command.rocket.make.repository'
        );

        $this->commands(
            'command.rocket.make.event'
        );

        $this->commands(
            'command.rocket.make.crud.admin'
        );

        $this->commands(
            'command.rocket.make.api.admin'
        );

        $this->commands(
            'command.rocket.validate'
        );
    }
1077298
public function register()
    {
        $this->registerHtmlBuilder();
        $this->registerThemeFormBuilder();
        $this->registerThemeViews();
        $this->registerThemeLayouts();
        $this->registerThemeExtension();
    }
1097389
public function register()
    {
        $this->app['validation'] = $this->app->share(function () {
            return new Factory(new Parser());
        });

        $this->app->alias('validation', 'Ionix\Validation\Factory');
    }
968811
protected function registerFormBuilder()
    {
        $this->app->singleton('form', function ($app) {
            $form = new BootstrapFormBuilder($app['html'], $app['url'], $app['view'], $app['session.store']->getToken());

            return $form->setSessionStore($app['session.store']);
        });
    }
1293082
public function register()
	{
		$this->app->bindShared('package.creator', function($app)
		{
			return new PackageCreator($app['files']);
		});

		$this->app->bindShared('command.workbench', function($app)
		{
			return new WorkbenchMakeCommand($app['package.creator']);
		});

		$this->commands('command.workbench');
	}
406236
public function register()
    {
        $this->app->singleton('validator/user/email', function (Application $app) {
            $config = $app->make('config');
            $manager = $app->make(ValidatorForSubjectInterface::class);

            $manager->setValidator(
                'unique_user_email',
                $app->make(
                    UniqueUserEmailValidator::class,
                    [
                        'testMXRecord' => $config->get('concrete.user.email.test_mx_record'),
                        'strict' => $config->get('concrete.user.email.strict'),
                    ]
                )
            );

            return $manager;
        });
    }
520525
public function register()
    {
        $this->app->singleton('artisan', function ($app) {
            $artisan = new Artisan($app, $app->make('events'), $app->version());
            $commands = $this->app->runningInPhar() ? [] : $this->commands;
            $artisan->resolveCommands($commands);

            return $artisan;
        });
    }
588704
public function register()
    {
        $this->app->singleton('command.phpcsfixer.fix', function ($app) {
            return new ArtisanPhpCsFixerFix;
        });

        $this->app->singleton('command.phpcsfixer.version', function ($app) {
            return new ArtisanPhpCsFixerVersion;
        });

        $this->app->singleton('command.phpcsfixer.describe', function ($app) {
            return new ArtisanPhpCsFixerDescribe;
        });

        $this->app->singleton('command.phpcsfixer.readme', function ($app) {
            return new ArtisanPhpCsFixerReadme;
        });

        $this->commands('command.phpcsfixer.fix');
        $this->commands('command.phpcsfixer.version');
        $this->commands('command.phpcsfixer.describe');
        $this->commands('command.phpcsfixer.readme');
    }
5467
public function boot()
    {
        $this->loadViewsFrom(__DIR__ . '/../../views', 'laravel-form-builder');

        $this->publishes([
            __DIR__ . '/../../views' => base_path('resources/views/vendor/laravel-form-builder'),
            __DIR__ . '/../../config/config.php' => config_path('laravel-form-builder.php')
        ]);

        $form = $this->app['form'];

        $form->macro('customLabel', function($name, $value, $options = []) use ($form) {
            if (isset($options['for']) && $for = $options['for']) {
                unset($options['for']);
                return $form->label($for, $value, $options);
            }

            return $form->label($name, $value, $options);
        });
    }
230994
protected function registerFormBuilder()
    {
        $this->app->singleton('form', function ($app) {
            $form = new FormBuilder($app['html'], $app['url'], $app['view'], $app['session.store']->token(), $app['request']);

            return $form->setSessionStore($app['session.store']);
        });
    }
6087
public function register() {
		$builder = $this->get_builder();

		// Sets the builder configures.
		foreach ( $this->get_builder_config() as $key => $value ) {
			$builder->set_option( $key, $value );
		}

		( new Loader( $builder ) )->fire();
	}
1326244
protected function registerOrchestraFormBuilder(): void
    {
        $this->app->singleton(FormControlContract::class, Control::class);

        $this->app->singleton(TemplateContract::class, function (Application $app) {
            $namespace = $this->hasPackageRepository() ? 'orchestra/html::form' : 'orchestra.form';

            $class = $app->make('config')->get("{$namespace}.presenter", BootstrapThreePresenter::class);

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

        $this->app->singleton('orchestra.form', function (Application $app) {
            return new FormFactory($app);
        });
    }