-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
namespace App\Observers; | ||
|
||
use App\Models\Stat; | ||
use Illuminate\Support\Facades\DB; | ||
|
||
class StatObserver | ||
{ | ||
/** | ||
* Handle the Stat "created" event. | ||
*/ | ||
public function created(Stat $stat): void | ||
{ | ||
// | ||
DB::table('stats')->increment('projects_count'); | ||
} | ||
|
||
/** | ||
* Handle the Stat "updated" event. | ||
*/ | ||
public function updated(Stat $stat): void | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Handle the Stat "deleted" event. | ||
*/ | ||
public function deleted(Stat $stat): void | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Handle the Stat "restored" event. | ||
*/ | ||
public function restored(Stat $stat): void | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Handle the Stat "force deleted" event. | ||
*/ | ||
public function forceDeleted(Stat $stat): void | ||
{ | ||
// | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters