mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-23 09:04:45 +02:00

* Remove deploy.locations from validator * Change location data to optional for backwards compat * Better styling * Add back comma to follow coding style * Remove EventServiceProvider from providers file Fixes duplicated auth messages in the client Activity tab. * Add null check on $model->actor Prevents the client Activity tab page from breaking when an authentication attempt has failed. * Proper type checking on $model->actor Chose instanceof as it seems to be the best in terms of type safety. Co-authored-by: MartinOscar <40749467+RMartinOscar@users.noreply.github.com> * Revert removal of EventServiceProvider * Remove subscription of AuthenticationListener * Remove subscriptions for auth events * Remove unused import Dispatcher * Remove unused import AuthenticationListener --------- Co-authored-by: MartinOscar <40749467+RMartinOscar@users.noreply.github.com>
39 lines
1.0 KiB
PHP
39 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\User;
|
|
use App\Models\Server;
|
|
use App\Models\Subuser;
|
|
use App\Models\EggVariable;
|
|
use App\Observers\UserObserver;
|
|
use App\Observers\ServerObserver;
|
|
use App\Observers\SubuserObserver;
|
|
use App\Observers\EggVariableObserver;
|
|
use App\Events\Server\Installed as ServerInstalledEvent;
|
|
use App\Notifications\ServerInstalled as ServerInstalledNotification;
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
|
|
|
class EventServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* The event to listener mappings for the application.
|
|
*/
|
|
protected $listen = [
|
|
ServerInstalledEvent::class => [ServerInstalledNotification::class],
|
|
];
|
|
|
|
/**
|
|
* Register any events for your application.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
parent::boot();
|
|
|
|
User::observe(UserObserver::class);
|
|
Server::observe(ServerObserver::class);
|
|
Subuser::observe(SubuserObserver::class);
|
|
EggVariable::observe(EggVariableObserver::class);
|
|
}
|
|
}
|