StocksNew/app/Observers/WarningObserver.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

51 lines
959 B
PHP

<?php
namespace App\Observers;
use App\Notifications\HrActionNotification;
use Modules\Admin\Models\Warning;
class WarningObserver
{
/**
* Handle the Warning "created" event.
*/
public function created(Warning $warning): void
{
$employee = $warning->warningRecipient;
$employee->notify(new HrActionNotification('warning', $warning,'you have been warned'));
}
/**
* Handle the Warning "updated" event.
*/
public function updated(Warning $warning): void
{
//
}
/**
* Handle the Warning "deleted" event.
*/
public function deleted(Warning $warning): void
{
//
}
/**
* Handle the Warning "restored" event.
*/
public function restored(Warning $warning): void
{
//
}
/**
* Handle the Warning "force deleted" event.
*/
public function forceDeleted(Warning $warning): void
{
//
}
}