Exemplo n.º 1
0
 /**
  * Run the seeder.
  */
 public function run()
 {
     $this->pages->truncate();
     $type = $this->types->findBySlug('default');
     $welcome = (new PagesDefaultPagesEntryModel())->create(['content' => '<p>Welcome to PyroCMS!</p>']);
     $login = (new PagesDefaultPagesEntryModel())->create(['content' => '{{ form(\'login\').successMessage(\'You are now logged in.\')|raw }}']);
     $this->pages->create(['en' => ['title' => 'Welcome'], 'slug' => 'welcome', 'entry' => $welcome, 'type' => $type, 'enabled' => true, 'home' => true, 'theme_layout' => 'theme::layouts/default.twig'])->allowedRoles()->sync([]);
     $this->pages->create(['en' => ['title' => 'Login'], 'slug' => 'login', 'entry' => $login, 'type' => $type, 'enabled' => true, 'theme_layout' => 'theme::layouts/default.twig'])->allowedRoles()->sync([]);
 }
Exemplo n.º 2
0
 /**
  * Run the seeder.
  */
 public function run()
 {
     $this->pages->truncate();
     $type = $this->types->findBySlug('default');
     $this->pages->create(['en' => ['title' => 'Welcome'], 'slug' => 'welcome', 'entry' => $type->getEntryModel()->create(['content' => '<p>Welcome to PyroCMS!</p>']), 'type' => $type, 'enabled' => true, 'home' => true, 'theme_layout' => 'theme::layouts/default.twig'])->allowedRoles()->sync([]);
 }