mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
timeblock finished email notification
This commit is contained in:
1 parent
86424d1b3d
commit
28a0bac095
6 files changed
+162
No files matched your search
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Events\TimeBlockFinished;
|
||||
use App\Models\Timeblock;
|
||||
|
||||
class TimeBlockObserver
|
||||
{
|
||||
|
||||
public function updating(Timeblock $timeblock)
|
||||
{
|
||||
if ($timeblock->getOriginal('is_finished') == 0 && $timeblock->is_finished == 1) {
|
||||
TimeBlockFinished::dispatch($timeblock);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user