Beta version

This commit is too large to list all changes.
This commit is contained in:
2020-06-27 00:32:33 +01:00
parent d15c0cb12f
commit 5a8c080a31
135 changed files with 8534 additions and 12774 deletions

View File

@@ -7,6 +7,9 @@ use Illuminate\Auth\Events\Registered;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use App\User;
use App\Notifications\NewUser;
class OnUserRegistration
{
/**
@@ -29,5 +32,13 @@ class OnUserRegistration
{
// TODO: Send push notification to online admins via browser (w/ pusher)
Log::info('User ' . $event->user->name . ' has just registered for an account.');
foreach(User::all() as $user)
{
if ($user->hasRole('admin'))
{
$user->notify(new NewUser($event->user));
}
}
}
}