/**
  * Handle the command.
  *
  * @param  UpdatePaginaCommand  $command
  * @return void
  */
 public function handle(UpdatePaginaCommand $command)
 {
     $pagina_object = Pages::edit($command->pagina_id, $command->name, $command->slug);
     $pagina = $this->repo->save($pagina_object);
     Event::fire(new PaginaWasUpdated($pagina));
     return $pagina;
 }
Esempio n. 2
0
 public function getBySlug($slug)
 {
     // return Pages::with('contenuti.translations.versions')->where('slug', $slug)->first();
     return Pages::with('contenuti')->where('slug', $slug)->first();
 }
Esempio n. 3
0
 public function save(Pages $page)
 {
     $page->save();
     return $page;
 }