/**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->registerEloquent();
     $this->app->instance('env', defined('HERBERT_ENV') ? HERBERT_ENV : (defined('WP_DEBUG') ? 'local' : 'production'));
     $this->app->instance('http', \Herbert\Framework\Http::capture());
     $this->app->alias('http', 'Herbert\\Framework\\Http');
     $this->app->instance('router', $this->app->make('Herbert\\Framework\\Router', ['app' => $this->app]));
     $this->app->bind('route', 'Herbert\\Framework\\Route');
     $this->app->instance('enqueue', $this->app->make('Herbert\\Framework\\Enqueue', ['app' => $this->app]));
     $this->app->alias('enqueue', 'Herbert\\Framework\\Enqueue');
     $this->app->instance('panel', $this->app->make('Herbert\\Framework\\Panel', ['app' => $this->app]));
     $this->app->alias('panel', 'Herbert\\Framework\\Panel');
     $this->app->instance('shortcode', $this->app->make('Herbert\\Framework\\Shortcode', ['app' => $this->app]));
     $this->app->alias('shortcode', 'Herbert\\Framework\\Shortcode');
     $this->app->instance('widget', $this->app->make('Herbert\\Framework\\Widget', ['app' => $this->app]));
     $this->app->alias('widget', 'Herbert\\Framework\\Widget');
     $this->app->instance('session', $this->app->make('Herbert\\Framework\\Session', ['app' => $this->app]));
     $this->app->alias('session', 'Herbert\\Framework\\Session');
     $this->app->instance('notifier', $this->app->make('Herbert\\Framework\\Notifier', ['app' => $this->app]));
     $this->app->alias('notifier', 'Herbert\\Framework\\Notifier');
     $this->app->singleton('errors', function () {
         return session_flashed('__validation_errors', []);
     });
     $_GLOBALS['errors'] = $this->app['errors'];
 }
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->registerEloquent();
     $this->app->instance('env', defined('WPKIT_ENV') ? WPKIT_ENV : (defined('WP_DEBUG') ? 'local' : 'production'));
     $this->app->instance('http', \WPKit\Core\Http::capture());
     $this->app->alias('http', 'WPKit\\Core\\Http');
     $this->app->bind('router', 'WPKit\\Core\\Router');
     $this->app->instance('session', $this->app->make('WPKit\\Core\\Session', ['app' => $this->app]));
     $this->app->alias('session', 'WPKit\\Core\\Session');
     $this->app->instance('notifier', $this->app->make('WPKit\\Core\\Notifier', ['app' => $this->app]));
     $this->app->alias('notifier', 'WPKit\\Core\\Notifier');
     $this->app->instance('invoker', $this->app->make('WPKit\\Core\\Invoker', ['app' => $this->app]));
     $this->app->alias('invoker', 'WPKit\\Core\\Invoker');
     $this->app->singleton('Illuminate\\Contracts\\Debug\\ExceptionHandler', 'WPKit\\Core\\ExceptionHandler');
     $this->app->singleton('errors', function () {
         return session_flashed('__validation_errors', []);
     });
     $_GLOBALS['errors'] = $this->app['errors'];
 }