first commit
This commit is contained in:
52
app/Observers/PromotionDemotionObserver.php
Normal file
52
app/Observers/PromotionDemotionObserver.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?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
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user