protected function seedSampleSourceAndData()
 {
     $datasource = new FileDatasource($this->themePath, new Filesystem());
     $resolver = new Resolver(['theme1' => $datasource]);
     $resolver->setDefaultDatasource('theme1');
     Model::setDatasourceResolver($resolver);
     LocaleModel::unguard();
     LocaleModel::firstOrCreate(['code' => 'fr', 'name' => 'French', 'is_enabled' => 1]);
     LocaleModel::reguard();
     $this->recycleSampleData();
 }
Example #2
0
 protected function setDatasourceResolver()
 {
     $theme1 = new FileDatasource(__DIR__ . '/../fixtures/halcyon/themes/theme1', new Filesystem());
     $this->resolver = new Resolver(['theme1' => $theme1]);
     $this->resolver->setDefaultDatasource('theme1');
     $theme2 = new FileDatasource(__DIR__ . '/../fixtures/halcyon/themes/theme2', new Filesystem());
     $this->resolver->addDatasource('theme2', $theme2);
     Model::setDatasourceResolver($this->resolver);
 }
Example #3
0
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     Model::setDatasourceResolver($this->app['halcyon']);
     Model::setEventDispatcher($this->app['events']);
     Model::setCacheManager($this->app['cache']);
 }