/** * Handle the command. * * @param CreateListinoCommand $command * @return void */ public function handle(CreateListinoCommand $command) { $listino_object = Listini::make($command->titolo); $listino = $this->repo->save($listino_object); $this->caricaAllegato($listino, $command->allegato); Event::fire(new ListinoWasCreated($listino)); return $listino; }
public function getById($id) { return Listini::where('id', $id)->first(); }