Added Support and Analytics for Release

This commit is contained in:
2026-07-10 21:59:35 +10:00
parent d765161b9a
commit 85eeba982f
24 changed files with 673 additions and 320 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Observers;
use App\Models\Notification;
use App\Models\User;
class UserObserver
{
public function created(User $user): void
{
User::role('admin')
->where('id', '!=', $user->id)
->get(['id'])
->each(fn (User $admin) => Notification::create([
'user_id' => $admin->id,
'title' => 'New user registered',
'body' => "{$user->name} just signed up.",
'url' => null,
'is_achievement' => false,
'achievement_id' => null,
]));
}
}