Add base implementation of extendable events classes
Modified server deletion to use internal event handlers from the Eloquent models themselves. Also added a few preliminary event handlers in the `Pterodactyl\Events\<USer|Server> namespace that users can hook into in EventServiceProvider to perform their own actions as they please (such as push notifications and such).
This commit is contained in:
parent
bf7b58470a
commit
a137e6ed72
16 changed files with 506 additions and 42 deletions
|
@ -26,9 +26,12 @@ namespace Pterodactyl\Models;
|
|||
|
||||
use GuzzleHttp\Client;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
class Node extends Model
|
||||
{
|
||||
use Notifiable;
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
|
|
|
@ -26,11 +26,12 @@ namespace Pterodactyl\Models;
|
|||
|
||||
use Auth;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Server extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
use Notifiable, SoftDeletes;
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue