/**
  * Handle the command.
  *
  * @param  CreateCandidaturaCommand  $command
  * @return void
  */
 public function handle(CreateCandidaturaCommand $command)
 {
     $candidatura_object = Candidature::make($command->posizione_id, $command->nome, $command->cognome, $command->email, $command->messaggio);
     $candidatura = $this->repo->save($candidatura_object);
     $this->caricaCv($candidatura, $command->cv_path);
     Event::fire(new CandidaturaWasCreated($candidatura));
     return $candidatura;
 }
Ejemplo n.º 2
0
 public function getById($id)
 {
     return Candidature::where('id', $id)->with('posizione')->first();
 }