StocksNew/app/Observers/PromotionDemotionObserver.php

53 lines
1.2 KiB
PHP
Raw Normal View History

2024-08-27 12:03:06 +00:00
<?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
{
//
}
}