Commit b79f3b880e02ad5d0ac5835d8528a7f246a30ea6

Authored by Eder Soares
1 parent 0db12514
Exists in 2.8 and in 6 other branches 2.2, 2.3, 2.4, 2.5, 2.6, 2.7

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

app/Models/LegacyVacancyReservationCandidate.php
@@ -43,4 +43,17 @@ class LegacyVacancyReservationCandidate extends Model @@ -43,4 +43,17 @@ class LegacyVacancyReservationCandidate extends Model
43 * @var bool 43 * @var bool
44 */ 44 */
45 public $timestamps = false; 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 }