/**
  * Handle the command.
  *
  * @param  CreateSegnalazioneCommand  $command
  * @return void
  */
 public function handle(CreateSegnalazioneCommand $command)
 {
     $segnalazione_object = Segnalazioni::make($command->nome, $command->cognome, $command->dob, $command->email, $command->messaggio);
     $segnalazione = $this->repo->save($segnalazione_object);
     Event::fire(new SegnalazioneWasCreated($segnalazione));
     return $segnalazione;
 }
Example #2
0
 public function getById($id)
 {
     return Segnalazioni::where('id', $id)->first();
 }