Files
animethemes-server/app/Events/Admin/Setting/SettingCreated.php
T
paranarimasu 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

35 lines
750 B
PHP

<?php
declare(strict_types=1);
namespace App\Events\Admin\Setting;
use App\Enums\Discord\EmbedColor;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use NotificationChannels\Discord\DiscordMessage;
/**
* Class SettingCreated.
*/
class SettingCreated extends SettingEvent
{
use Dispatchable;
use SerializesModels;
/**
* Get Discord message payload.
*
* @return DiscordMessage
*/
public function getDiscordMessage(): DiscordMessage
{
$setting = $this->getSetting();
return DiscordMessage::create('', [
'description' => "Setting '**{$setting->getName()}**' has been created.",
'color' => EmbedColor::GREEN,
]);
}
}