18 lines
304 B
PHP
18 lines
304 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Observers;
|
|
|
|
use App\Models\EmployeeDocument;
|
|
|
|
class EmployeeDocumentObserver
|
|
{
|
|
public function creating(EmployeeDocument $document): void
|
|
{
|
|
if ($document->uploaded_at === null) {
|
|
$document->uploaded_at = now();
|
|
}
|
|
}
|
|
}
|