Files
animethemes-server/app/Events/Base/Admin/AdminRestoredEvent.php
T
paranarimasuandGitHub 088ea287c5 feat: initial migration to pennant features for feature flags and global site config [incremental] (#573)
* feat: initial commit for feature management

* style: fix StyleCI findings

* fix(api): prohibit features of nonnull scope from API & fix(admin): wrong translate key

* style: fix Static Analysis error
2023-04-23 18:54:34 -05:00

40 lines
797 B
PHP

<?php
declare(strict_types=1);
namespace App\Events\Base\Admin;
use App\Constants\Config\ServiceConstants;
use App\Events\Base\BaseRestoredEvent;
use Illuminate\Support\Facades\Config;
/**
* Class AdminRestoredEvent.
*
* @template TModel of \App\Models\BaseModel
*
* @extends BaseRestoredEvent<TModel>
*/
abstract class AdminRestoredEvent extends BaseRestoredEvent
{
/**
* Get Discord channel the message will be sent to.
*
* @return string
*/
public function getDiscordChannel(): string
{
return Config::get(ServiceConstants::ADMIN_DISCORD_CHANNEL_QUALIFIED);
}
/**
* Determine if the message should be sent.
*
* @return bool
*/
public function shouldSendDiscordMessage(): bool
{
return true;
}
}