first commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events;
|
||||
|
||||
abstract class Event
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Permission;
|
||||
|
||||
class Created extends PermissionEvent {}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Permission;
|
||||
|
||||
class Deleted extends PermissionEvent {}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Permission;
|
||||
|
||||
use App\Models\Permission;
|
||||
|
||||
abstract class PermissionEvent
|
||||
{
|
||||
public function __construct(protected Permission $permission) {}
|
||||
|
||||
public function getPermission(): Permission
|
||||
{
|
||||
return $this->permission;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Permission;
|
||||
|
||||
class Updated extends PermissionEvent {}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Role;
|
||||
|
||||
class Created extends RoleEvent {}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Role;
|
||||
|
||||
class Deleted extends RoleEvent {}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Role;
|
||||
|
||||
class PermissionsUpdated {}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Role;
|
||||
|
||||
use App\Models\Role;
|
||||
|
||||
abstract class RoleEvent
|
||||
{
|
||||
public function __construct(protected Role $role) {}
|
||||
|
||||
public function getRole(): Role
|
||||
{
|
||||
return $this->role;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Role;
|
||||
|
||||
class Updated extends RoleEvent {}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Settings;
|
||||
|
||||
class Updated {}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class Approved
|
||||
{
|
||||
public function __construct(protected User $approvedUser) {}
|
||||
|
||||
public function getApprovedUser(): User
|
||||
{
|
||||
return $this->approvedUser;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class Banned
|
||||
{
|
||||
public function __construct(protected User $bannedUser) {}
|
||||
|
||||
public function getBannedUser(): User
|
||||
{
|
||||
return $this->bannedUser;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
class ChangedAvatar {}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class Created
|
||||
{
|
||||
public function __construct(protected User $createdUser) {}
|
||||
|
||||
public function getCreatedUser(): User
|
||||
{
|
||||
return $this->createdUser;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class Deleted
|
||||
{
|
||||
public function __construct(protected User $deletedUser) {}
|
||||
|
||||
public function getDeletedUser(): User
|
||||
{
|
||||
return $this->deletedUser;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
class LoggedIn {}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
class LoggedOut {}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class RequestedPasswordResetEmail
|
||||
{
|
||||
public function __construct(protected User $user) {}
|
||||
|
||||
public function getUser(): User
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
class TwoFactorDisabled {}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class TwoFactorDisabledByAdmin
|
||||
{
|
||||
public function __construct(protected User $user) {}
|
||||
|
||||
public function getUser(): User
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
class TwoFactorEnabled {}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class TwoFactorEnabledByAdmin
|
||||
{
|
||||
public function __construct(protected User $user) {}
|
||||
|
||||
public function getUser(): User
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class UpdatedByAdmin
|
||||
{
|
||||
public function __construct(protected User $updatedUser) {}
|
||||
|
||||
public function getUpdatedUser(): User
|
||||
{
|
||||
return $this->updatedUser;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\User;
|
||||
|
||||
class UpdatedProfileDetails {}
|
||||
Reference in New Issue
Block a user