Commit b79f3b880e02ad5d0ac5835d8528a7f246a30ea6

Authored by Eder Soares
1 parent 0db12514
Exists in master

Salva a data na criação da reserva de vaga

app/Models/LegacyVacancyReservationCandidate.php
... ... @@ -43,4 +43,17 @@ class LegacyVacancyReservationCandidate extends Model
43 43 * @var bool
44 44 */
45 45 public $timestamps = false;
  46 +
  47 + /**
  48 + * @inheritDoc
  49 + */
  50 + protected static function boot()
  51 + {
  52 + parent::boot();
  53 +
  54 + static::creating(function ($model) {
  55 + $model->data_situacao = now()->format('Y-m-d');
  56 + $model->hora_solicitacao = now()->format('H:i:s');
  57 + });
  58 + }
46 59 }
... ...