### Usage Example for featherpanel:auth:2fa:setup Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/auth.html Example of how to listen for the 'featherpanel:auth:2fa:setup' event and access user information. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\AuthEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(AuthEvent::onAuth2FASetup(), function ($user) { // Handle featherpanel:auth:2fa:setup // Data keys: user }); } ``` -------------------------------- ### Wings Server Install Retrieved Event Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/wings.html Example of how to listen for the 'featherpanel:wings:server:install:retrieved' event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\WingsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(WingsEvent::onWingsServerInstallRetrieved(), function ($installConfig, $node, $server, $serverUuid, $spell) { // Handle featherpanel:wings:server:install:retrieved // Data keys: install_config, node, server, server_uuid, spell }); } ``` -------------------------------- ### Usage Example for onAllocationUpdated Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/allocations.html Example of how to listen for the onAllocationUpdated event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\AllocationsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(AllocationsEvent::onAllocationUpdated(), function ($allocation, $deletedSourceConflicts, $deletedTargetConflicts, $fromIp, $ipAlias, $matchedCount, $nodeId, $toIp, $updatedBy, $updatedCount, $updatedData) { // Handle featherpanel:admin:allocations:allocation:updated // Data keys: allocation, deleted_source_conflicts, deleted_target_conflicts, from_ip, ip_alias, matched_count, node_id, to_ip, updated_by, updated_count, updated_data }); } ``` -------------------------------- ### Usage Example: onSubdomainSettingsUpdated Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/subdomains.html Example of how to listen for the 'onSubdomainSettingsUpdated' event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\SubdomainsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(SubdomainsEvent::onSubdomainSettingsUpdated(), function ($allowUserSubdomains, $cloudflareApiKeySet, $cloudflareEmail, $maxSubdomainsPerServer, $settings, $updatedBy) { // Handle featherpanel:admin:subdomains:settings:updated // Data keys: allow_user_subdomains, cloudflare_api_key_set, cloudflare_email, max_subdomains_per_server, settings, updated_by }); } ``` -------------------------------- ### Usage Example for onAllocationsRetrieved Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/allocations.html Example of how to listen for the onAllocationsRetrieved event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\AllocationsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(AllocationsEvent::onAllocationsRetrieved(), function ($list) { // Handle featherpanel:admin:allocations:retrieved // Parameters: array allocations list. }); } ``` -------------------------------- ### Usage Example for onAllocationsError Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/allocations.html Example of how to listen for the onAllocationsError event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\AllocationsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(AllocationsEvent::onAllocationsError(), function ($message, $context) { // Handle featherpanel:admin:allocations:error // Parameters: string error message, array context. }); } ``` -------------------------------- ### Usage Example for onServerLifecycleHookStepStarted Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/server.html Example of how to use the onServerLifecycleHookStepStarted event listener. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\ServerEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(ServerEvent::onServerLifecycleHookStepStarted(), function ($uuid, $uuid, $action, $id, $id, $type) { // Handle featherpanel:server:lifecycle-hook:step:started // Parameters: string user uuid, string server uuid, string power action, int hook id, int step id, string task type. }); } ``` -------------------------------- ### Usage Example for onServerFileCompressed Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/server.html Example of how to use the onServerFileCompressed event listener. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\ServerEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(ServerEvent::onServerFileCompressed(), function ($filePath, $serverUuid, $userUuid) { // Handle featherpanel:server:file:compress // Data keys: file_path, server_uuid, user_uuid }); } ``` -------------------------------- ### Usage Example for onServerLifecycleHookStarted Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/server.html Example of how to use the onServerLifecycleHookStarted event listener. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\ServerEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(ServerEvent::onServerLifecycleHookStarted(), function ($uuid, $uuid, $action, $id, $type) { // Handle featherpanel:server:lifecycle-hook:started // Parameters: string user uuid, string server uuid, string power action, int hook id, string hook type. }); } ``` -------------------------------- ### Widget Configuration Example Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/widgets/server-startup.html Example of a widgets.json file to inject a widget into the server-startup page. ```json { "id": "my-plugin-widget", "component": "my-widget.html", "enabled": true, "priority": 100, "page": "server-startup", "location": "after-docker-image", "size": "full" } ``` -------------------------------- ### Usage Example: Scan Started Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/feather-zero-trust.html Example of how to handle the featherpanel:admin:featherzerotrust:scan:started event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\FeatherZeroTrustEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(FeatherZeroTrustEvent::onFeatherZeroTrustScanStarted(), function ($directory, $maxDepth, $serverUuid, $startedBy) { // Handle featherpanel:admin:featherzerotrust:scan:started // Data keys: directory, max_depth, server_uuid, started_by }); } ``` -------------------------------- ### Usage Example for onSettingsUpdated Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/settings.html Example of how to listen for the 'featherpanel:admin:settings:updated' event and handle the callback parameters. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\SettingsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(SettingsEvent::onSettingsUpdated(), function ($settingsData, $updatedSettings, $user) { // Handle featherpanel:admin:settings:updated // Data keys: settings_data, updated_settings, user }); } ``` -------------------------------- ### Wings Server Install Completed Event Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/wings.html Example of how to listen for the 'featherpanel:wings:server:install:completed' event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\WingsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(WingsEvent::onWingsServerInstallCompleted(), function ($installedAt, $node, $reinstall, $server, $serverUuid, $status, $successful) { // Handle featherpanel:wings:server:install:completed // Data keys: installed_at, node, reinstall, server, server_uuid, status, successful }); } ``` -------------------------------- ### Widget Configuration Example Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/widgets/server-startup-transfer-spell.html Example of a widgets.json file to inject a widget into the server-startup-transfer-spell page. ```json { "id": "my-plugin-widget", "component": "my-widget.html", "enabled": true, "priority": 100, "page": "server-startup-transfer-spell", "location": "after-header", "size": "full" } ``` -------------------------------- ### Widget Configuration Example Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/widgets/server-subdomains-new.html Example of a widgets.json file to inject a widget into the 'server-subdomains-new' page. ```json { "id": "my-plugin-widget", "component": "my-widget.html", "enabled": true, "priority": 100, "page": "server-subdomains-new", "location": "after-header", "size": "full" } ``` -------------------------------- ### Handle featherpanel:cloud:plugin:installed event Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/cloud-plugins.html Example of how to register a listener for the 'featherpanel:cloud:plugin:installed' event and handle its parameters. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\CloudPluginsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(CloudPluginsEvent::onPluginInstalled(), function ($identifier, $data, $uuid) { // Handle featherpanel:cloud:plugin:installed // Parameters: string identifier, array plugin data, string user uuid. }); } ``` -------------------------------- ### Databases Retrieved Event (List) Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/databases.html Example of how to listen for the `featherpanel:admin:databases:retrieved` event to get a list of databases. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\DatabasesEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(DatabasesEvent::onDatabasesRetrieved(), function ($list) { // Handle featherpanel:admin:databases:retrieved // Parameters: array databases list. }); } ``` -------------------------------- ### Plugin Widget Configuration Example Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/widgets/auth-setup-2fa.html Example of a widgets.json file to inject a widget into the auth-setup-2fa page. ```json { "id": "my-plugin-widget", "component": "my-widget.html", "enabled": true, "priority": 100, "page": "auth-setup-2fa", "location": "auth-setup-2fa-after-form", "size": "full" } ``` -------------------------------- ### Client-side Metadata Validation Request Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/api/oauth2-playground.html Example GET request to validate OAuth2 parameters before opening the consent screen. ```http GET /api/user/api-clients/oauth2/metadata?name=My+Integration&callbackurl=client%3A%2F%2Foauth%2Fcallback&mode=user ``` -------------------------------- ### Plugin Widget Configuration Example Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/widgets/server-import-new.html Example of a widgets.json file to configure a plugin widget for injection into the server-import-new page. ```json { "id": "my-plugin-widget", "component": "my-widget.html", "enabled": true, "priority": 100, "page": "server-import-new", "location": "after-header", "size": "full" } ``` -------------------------------- ### VDS Power Actions Source: https://github.com/mythicalltd/featherpanel/blob/main/backend/app/Services/Chatbot/vds-system-prompt.txt Examples of using the `vds_power_action` tool for controlling VDS power states (start, stop, reboot). The `instance_id` is optional when the context is already set to a specific VDS. ```tool_code TOOL_CALL: vds_power_action {"instance_id": 5, "action": "start"} TOOL_CALL: vds_power_action {"instance_id": 5, "action": "stop"} TOOL_CALL: vds_power_action {"instance_id": 5, "action": "reboot"} ``` -------------------------------- ### Plugin Widget Configuration Example Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/widgets/server-proxy-new.html Example of a widgets.json file to inject a widget into the server-proxy-new page. ```json { "id": "my-plugin-widget", "component": "my-widget.html", "enabled": true, "priority": 100, "page": "server-proxy-new", "location": "after-header", "size": "full" } ``` -------------------------------- ### Usage Example for onSpellVariableUpdated Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/spells.html Example of how to use the onSpellVariableUpdated event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\SpellsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(SpellsEvent::onSpellVariableUpdated(), function ($updatedData, $variable) { // Handle featherpanel:admin:spells:variable:updated // Data keys: updated_data, variable }); } ``` -------------------------------- ### Plugin Widget Configuration Example Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/widgets/server-schedules-new.html Example of a widgets.json file to inject a widget into the server-schedules-new page. ```json { "id": "my-plugin-widget", "component": "my-widget.html", "enabled": true, "priority": 100, "page": "server-schedules-new", "location": "after-header", "size": "full" } ``` -------------------------------- ### Usage Example for featherpanel:server:backup:create Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/server.html This example shows how to handle the `featherpanel:server:backup:create` event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\ServerEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(ServerEvent::onServerBackupCreated(), function ($uuid, $uuid, $uuid) { // Handle featherpanel:server:backup:create // Parameters: string user uuid, string server uuid, string backup uuid. }); } ``` -------------------------------- ### Usage Example for onSpellVariablesRetrieved Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/spells.html Example of how to use the onSpellVariablesRetrieved event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\SpellsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(SpellsEvent::onSpellVariablesRetrieved(), function ($id, $variables) { // Handle featherpanel:admin:spells:variables:retrieved // Parameters: int spell id, array variables. }); } ``` -------------------------------- ### Usage Example for router::Ready Event Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/app.html Demonstrates how to listen for the router::Ready event using the PluginEvents class. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\AppEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(AppEvent::onRouterReady(), function ($parameters) { // Handle router::Ready // Parameters: No parameters }); } ``` -------------------------------- ### Usage Example for onSpellVariableDeleted Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/spells.html Example of how to use the onSpellVariableDeleted event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\SpellsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(SpellsEvent::onSpellVariableDeleted(), function ($variable) { // Handle featherpanel:admin:spells:variable:deleted // Data keys: variable }); } ``` -------------------------------- ### Plugin Widget Configuration Example Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/widgets/server-lifecycle-step-create.html Example of a widgets.json file to inject a widget into the server-lifecycle-step-create page. ```json { "id": "my-plugin-widget", "component": "my-widget.html", "enabled": true, "priority": 100, "page": "server-lifecycle-step-create", "location": "bottom-of-page", "size": "full" } ``` -------------------------------- ### Usage Example: onSubdomainsError Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/subdomains.html Example of how to listen for the 'onSubdomainsError' event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\SubdomainsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(SubdomainsEvent::onSubdomainsError(), function ($message, $context) { // Handle featherpanel:admin:subdomains:error // Parameters: string error message, array context. }); } ``` -------------------------------- ### Usage Example for featherpanel:server:allocation:create Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/server.html This example demonstrates how to listen for the `featherpanel:server:allocation:create` event and access its parameters and data. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\ServerEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(ServerEvent::onServerAllocationCreated(), function ($allocationId, $serverUuid, $userUuid) { // Handle featherpanel:server:allocation:create // Data keys: allocation_id, server_uuid, user_uuid }); } ``` -------------------------------- ### Widget Configuration Example Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/widgets/server-import.html Example of a widgets.json file to inject a widget into the server-import page. ```json { "id": "my-plugin-widget", "component": "my-widget.html", "enabled": true, "priority": 100, "page": "server-import", "location": "after-header", "size": "full" } ``` -------------------------------- ### Usage Example: onSubdomainDomainUpdated Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/subdomains.html Example of how to listen for the 'onSubdomainDomainUpdated' event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\SubdomainsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(SubdomainsEvent::onSubdomainDomainUpdated(), function ($domainUuid, $newData, $oldData, $updatedBy) { // Handle featherpanel:admin:subdomains:domain:updated // Data keys: domain_uuid, new_data, old_data, updated_by }); } ``` -------------------------------- ### Usage Example for onServerDirectoryCreated Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/server-files.html Example of how to listen for the featherpanel:user:server:directory:created event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\ServerFilesEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(ServerFilesEvent::onServerDirectoryCreated(), function ($directoryPath, $serverUuid, $userUuid) { // Handle featherpanel:user:server:directory:created // Data keys: directory_path, server_uuid, user_uuid }); } ``` -------------------------------- ### Usage Example: onSubdomainDomainsRetrieved Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/subdomains.html Example of how to listen for the 'onSubdomainDomainsRetrieved' event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\SubdomainsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(SubdomainsEvent::onSubdomainDomainsRetrieved(), function ($domains, $filters, $includeInactive, $limit, $page, $pagination, $search, $total) { // Handle featherpanel:admin:subdomains:domains:retrieved // Data keys: domains, filters, includeInactive, limit, page, pagination, search, total }); } ``` -------------------------------- ### featherpanel:server:reinstall Usage Example Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/server.html Example of how to listen for the server reinstall event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\ServerEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(ServerEvent::onServerReinstalled(), function ($server, $serverUuid, $updatedBy, $userUuid) { // Handle featherpanel:server:reinstall // Data keys: server, server_uuid, updated_by, user_uuid }); } ``` -------------------------------- ### Usage Example: onSubdomainDomainRetrieved Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/subdomains.html Example of how to listen for the 'onSubdomainDomainRetrieved' event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\SubdomainsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(SubdomainsEvent::onSubdomainDomainRetrieved(), function ($domainData, $domainUuid) { // Handle featherpanel:admin:subdomains:domain:retrieved // Data keys: domain_data, domain_uuid }); } ``` -------------------------------- ### Usage Example: onSubdomainDomainNotFound Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/subdomains.html Example of how to listen for the 'onSubdomainDomainNotFound' event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\SubdomainsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(SubdomainsEvent::onSubdomainDomainNotFound(), function ($domainUuid, $errorMessage) { // Handle featherpanel:admin:subdomains:domain:not:found // Data keys: domain_uuid, error_message }); } ``` -------------------------------- ### Usage Example for onSettingsRetrieved Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/settings.html Example of how to listen for the 'featherpanel:admin:settings:retrieved' event and handle the callback parameters. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\SettingsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(SettingsEvent::onSettingsRetrieved(), function ($categories, $organizedSettings, $settings) { // Handle featherpanel:admin:settings:retrieved // Data keys: categories, organized_settings, settings }); } ``` -------------------------------- ### Usage Example for onSettingRetrieved Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/settings.html Example of how to listen for the 'featherpanel:admin:settings:setting:retrieved' event and handle the callback parameters. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\SettingsEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(SettingsEvent::onSettingRetrieved(), function ($settingData, $settingName) { // Handle featherpanel:admin:settings:setting:retrieved // Data keys: setting_data, setting_name }); } ``` -------------------------------- ### Usage Example for ServerFileUploaded Event Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/server-files.html Example of how to listen for the server file uploaded event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\ServerFilesEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(ServerFilesEvent::onServerFileUploaded(), function ($filePath, $serverUuid, $userUuid) { // Handle featherpanel:user:server:file:uploaded // Data keys: file_path, server_uuid, user_uuid }); } ``` -------------------------------- ### Using Permission Constants Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/permissions/admin-images.html Example demonstrating the use of permission constants instead of raw strings for better maintainability. ```php use App\Permissions; // Use constant instead of string if (PermissionHelper::hasPermission($userUuid, Permissions::ADMIN_IMAGES_CREATE)) { // User has permission } ``` -------------------------------- ### Usage Example for onAuthResetPasswordSuccess Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/auth.html Example of how to listen for the onAuthResetPasswordSuccess event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\AuthEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(AuthEvent::onAuthResetPasswordSuccess(), function ($user) { // Handle featherpanel:auth:reset:password:success // Data keys: user }); } ``` -------------------------------- ### Widget Configuration Example Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/widgets/server-databases.html Example of a widgets.json file to inject a widget into the server-databases page. ```json { "id": "my-plugin-widget", "component": "my-widget.html", "enabled": true, "priority": 100, "page": "server-databases", "location": "after-databases-list", "size": "full" } ``` -------------------------------- ### Usage Example for onAuthRegistrationFailed Source: https://github.com/mythicalltd/featherpanel/blob/main/frontendv2/public/icanhasfeatherpanel/events/auth.html Example of how to listen for the onAuthRegistrationFailed event. ```php use App\Plugins\PluginEvents; use App\Plugins\Events\Events\AuthEvent; public static function processEvents(PluginEvents $evt): void { $evt->on(AuthEvent::onAuthRegistrationFailed(), function ($email, $ipAddress, $reason, $username) { // Handle featherpanel:auth:registration:failed // Data keys: email, ip_address, reason, username }); } ```