コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
ファイル: SegnalazioniRepo.php プロジェクト: sidis405/ibi
 public function getById($id)
 {
     return Segnalazioni::where('id', $id)->first();
 }