Commit b79f3b880e02ad5d0ac5835d8528a7f246a30ea6
1 parent
0db12514
Exists in
2.8
and in
6 other branches
Salva a data na criação da reserva de vaga
Showing
1 changed file
with
13 additions
and
0 deletions
Show diff stats
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 | } |