示例#1
0
 protected function install()
 {
     try {
         $this->storeConfiguration();
         $this->runMigrations();
         $this->writeSettings();
         $this->container->register('Flarum\\Core\\CoreServiceProvider');
         $resolver = $this->container->make('Illuminate\\Database\\ConnectionResolverInterface');
         Model::setConnectionResolver($resolver);
         Model::setEventDispatcher($this->container->make('events'));
         $this->seedGroups();
         $this->seedPermissions();
         $this->createAdminUser();
         $this->enableBundledExtensions();
     } catch (Exception $e) {
         @unlink($this->getConfigFile());
         throw $e;
     }
 }