20 lines
387 B
PHP
20 lines
387 B
PHP
<?php
|
|
|
|
namespace App\Observers;
|
|
|
|
use App\Events\ReportDutyUpdated;
|
|
use App\Models\ReportDuty;
|
|
|
|
class ReportDutyObserver
|
|
{
|
|
public function created(ReportDuty $reportDuty): void
|
|
{
|
|
ReportDutyUpdated::dispatch($reportDuty, 'created');
|
|
}
|
|
|
|
public function updated(ReportDuty $reportDuty): void
|
|
{
|
|
ReportDutyUpdated::dispatch($reportDuty, 'updated');
|
|
}
|
|
}
|