public function register()
    {
        $this->registerFractalManager();

        /** @var \Illuminate\View\Factory $view */
        $view = $this->app['view'];
        $view->addLocation(__DIR__.'/views');

        $this->app->singleton('form', function ($app) {
            return new FormFactory(
                $app['validator'],
                $app['view'],
                $app['league.fractal'],
                new Factory()
            );
        });
    }