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

53 lines
1.2 KiB
PHP

<?php
namespace App\Observers;
use App\Notifications\HrActionNotification;
use Modules\Admin\Models\PromotionDemotion;
use Modules\Employee\Models\Employee;
class PromotionDemotionObserver
{
/**
* Handle the PromotionDemotion "created" event.
*/
public function created(PromotionDemotion $promotionDemotion): void
{
$employee = $promotionDemotion->employee;
$employee->notify(new HrActionNotification($promotionDemotion->type, $promotionDemotion,'You have been promoted'));
}
/**
* Handle the PromotionDemotion "updated" event.
*/
public function updated(PromotionDemotion $promotionDemotion): void
{
//
}
/**
* Handle the PromotionDemotion "deleted" event.
*/
public function deleted(PromotionDemotion $promotionDemotion): void
{
//
}
/**
* Handle the PromotionDemotion "restored" event.
*/
public function restored(PromotionDemotion $promotionDemotion): void
{
//
}
/**
* Handle the PromotionDemotion "force deleted" event.
*/
public function forceDeleted(PromotionDemotion $promotionDemotion): void
{
//
}
}