public function boot(UrlGenerator $url)
    {
        /**
         * Register commands, so you may execute them using the Artisan CLI.
         */
        if ($this->app->runningInConsole()) {
            $this->commands($this->commands);
        }

        /*
         * redirect http to https
         */
        $this->forceHTTPSScheme($url);

        /**
         * Register migrations, so they will be automatically run when the php artisan migrate command is executed.
         */
        $this->loadMigrationsFrom(__DIR__ . '/database/migrations');

        if(self::isInstalled()) {
            /**
             * Register Middleware
             */
            $kernel = $this->app['Illuminate\Contracts\Http\Kernel'];
            $kernel->pushMiddleware('Accio\App\Http\Middleware\HelpersEvents');

            /**
             * Register Service Providers
             */
            foreach ($this->providers as $namespace) {
                $this->app->register($namespace);
            }

            // Load Library translations
            $this->loadTranslationsFrom(accioPath('resources/lang'), 'accio');

            // Load Library views
            $this->loadViewsFrom(accioPath('resources/views'), 'accio');


            // Map routes
            $this->mapRoutes();

            /**
             * Register & Boot Plugins
             */
            $plugins = new Plugin();
            $plugins->autoloadPlugins();
            $plugins->registerPlugins();
            $plugins->bootPlugins();
            $plugins->addViewsPaths();

            // Load Plugin translations
            foreach($plugins->activePlugins() as $plugin){
                $this->loadTranslationsFrom($plugin->translationsPath(), $plugin->namespaceWithDot());
            }

            // Load Theme views
            $this->loadViewsFrom(Theme::getPath().'/'.'views', Theme::config('namespace'));

            Event::fire('system:boot', [$this]);
        }
    }