/** * 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; }
public function getBySlug($slug) { // return Pages::with('contenuti.translations.versions')->where('slug', $slug)->first(); return Pages::with('contenuti')->where('slug', $slug)->first(); }
public function save(Pages $page) { $page->save(); return $page; }