Register the date factory.

@return void
194167
protected function registerDateFactory()
    {
        $this->app->singleton(DateFactory::class, function ($app) {
            $appTimezone = $app['config']->get('app.timezone');
            $cacheTimezone = $app['config']->get('cachet.timezone');

            return new DateFactory($appTimezone, $cacheTimezone);
        });
    }
544446
public function registerFactory()
    {
        $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'];

            $factory = $this->createFactory($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.
            $factory->setContainer($app);

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

            return $factory;
        });
    }
605425
public function register()
    {
        $this->app->bind(ViewTrackerRepositoryContract::class, function () {
            $repository = new ViewTrackerRepository(new ViewTracker());

            if (config('webed-caching.repository.enabled')) {
                return new ViewTrackerRepositoryCacheDecorator($repository);
            }

            return $repository;
        });
    }
757686
public function register()
    {

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

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

        $this->registerFactoriesPath(__DIR__.'/factories');
    }
561546
public function register()
    {
        $this->registerConfigurationMapper();
        $this->registerCacheManager();
        $this->registerEntityManager();
        $this->registerClassMetadataFactory();
        $this->registerValidationVerifier();

        $this->commands([
            'Mitch\LaravelDoctrine\Console\GenerateProxiesCommand',
            'Mitch\LaravelDoctrine\Console\SchemaCreateCommand',
            'Mitch\LaravelDoctrine\Console\SchemaUpdateCommand',
            'Mitch\LaravelDoctrine\Console\SchemaDropCommand'
        ]);
    }
276292
public function register()
    {
        $this->app->singleton('hook.factory', function ($app) {
            return new HookFactory($app);
        });

        $this->app->alias('hook.factory', HookFactory::class);
    }
1097389
public function register()
    {
        $this->app['validation'] = $this->app->share(function () {
            return new Factory(new Parser());
        });

        $this->app->alias('validation', 'Ionix\Validation\Factory');
    }
40962
public function register()
    {
        $this->app->singleton('user.factory', function ($app) {
            return new UserFactory($app);
        });

        $this->app->alias('user.factory', UserFactory::class);
    }
157849
public function register()
    {
        $this->app->bindShared('schedule', function ($app)
        {
            return new Schedule($app);
        });

        $this->registerScheduleRunCommand();
        $this->registerScheduleFinishCommand();
    }
1350547
public function register()
    {
        $this->app->singleton('taxonomy.factory', function ($app) {
            return new TaxonomyFactory($app);
        });

        $this->app->alias('taxonomy.factory', TaxonomyFactory::class);
    }
1367471
public function registerFactory()
    {
        $this->app->bindShared('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 Template engine.
            $resolver = $app['view.engine.resolver'];

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

            $factory = new Factory($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.
            $factory->setContainer($app);

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

            return $factory;
        });
    }
660435
protected function registerFactory()
    {
        $this->app->singleton('vimeo.factory', function () : VimeoFactory {
            return new VimeoFactory();
        });

        $this->app->alias('vimeo.factory', VimeoFactory::class);
    }
773677
public function register()
    {
        $this->app->singleton('Feeds', function () {
            $config = config('feeds');

            if (! $config) {
                throw new \RunTimeException('Feeds configuration not found. Please run `php artisan vendor:publish`');
            }

            return new FeedsFactory($config);
        });
    }
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);
                });
        }
    }
856848
protected function registerEloquentFactory()
  {
      $this->app->singleton(FakerGenerator::class, function () {
          return FakerFactory::create();
      });

      $this->app->singleton(EloquentFactory::class, function ($app) {
          $faker = $app->make(FakerGenerator::class);

          return EloquentFactory::construct($faker, $this->app->basePath('database/factories'));
      });
  }
223974
public function registerThumbnailFactory()
    {
        $this->app->singleton('thumbnail.factory', function ($app) {
            return new ThumbnailFactory($app['thumbnails.collection'], $app);
        });

        $this->app->alias('thumbnail.factory', ThumbnailFactory::class);
    }
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']);
        });
    }