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