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

52 lines
1.1 KiB
PHP

<?php
namespace App\Observers;
use App\Notifications\HrActionNotification;
use Modules\Admin\Models\Appreciation;
use Modules\Employee\Models\Employee;
class AppreciationObserver
{
/**
* Handle the Appreciation "created" event.
*/
public function created(Appreciation $appreciation): void
{
$appreciatee = $appreciation->appreciatee;
$appreciatee->notify(new HrActionNotification('appreciation', $appreciation,'you have been appreciated.'));
}
/**
* Handle the Appreciation "updated" event.
*/
public function updated(Appreciation $appreciation): void
{
//
}
/**
* Handle the Appreciation "deleted" event.
*/
public function deleted(Appreciation $appreciation): void
{
//
}
/**
* Handle the Appreciation "restored" event.
*/
public function restored(Appreciation $appreciation): void
{
//
}
/**
* Handle the Appreciation "force deleted" event.
*/
public function forceDeleted(Appreciation $appreciation): void
{
//
}
}