You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 Final fix delete storage link to fix news_images and logs 🆙
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum AchievementCategory: string
|
||||
{
|
||||
case Identity = 'identity';
|
||||
case Explore = 'explore';
|
||||
case Music = 'music';
|
||||
case Social = 'social';
|
||||
case Games = 'games';
|
||||
case RoomBuilder = 'room_builder';
|
||||
case Pets = 'pets';
|
||||
case Tools = 'tools';
|
||||
case Events = 'events';
|
||||
|
||||
public static function values(): array
|
||||
{
|
||||
return array_column(self::cases(), 'value');
|
||||
}
|
||||
|
||||
public static function toInput(): array
|
||||
{
|
||||
$allCurrencies = self::cases();
|
||||
|
||||
return array_combine(
|
||||
array_column($allCurrencies, 'value'),
|
||||
array_column($allCurrencies, 'name'),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum CurrencyTypes: int
|
||||
{
|
||||
case Credits = -1;
|
||||
case Duckets = 0;
|
||||
case Diamonds = 5;
|
||||
case Points = 101;
|
||||
|
||||
public static function values(): array
|
||||
{
|
||||
return array_column(self::cases(), 'value');
|
||||
}
|
||||
|
||||
public static function fromCurrencyName(string $currencyName): ?self
|
||||
{
|
||||
$currencyName = strtolower($currencyName);
|
||||
|
||||
return match ($currencyName) {
|
||||
'credits' => self::Credits,
|
||||
'duckets' => self::Duckets,
|
||||
'diamonds' => self::Diamonds,
|
||||
'points' => self::Points,
|
||||
default => null,
|
||||
};
|
||||
}
|
||||
|
||||
public function getImage(): string
|
||||
{
|
||||
return match ($this->value) {
|
||||
CurrencyTypes::Credits->value => asset('assets/images/currencies/credits.gif'),
|
||||
CurrencyTypes::Duckets->value => asset('assets/images/currencies/duckets.png'),
|
||||
CurrencyTypes::Diamonds->value => asset('assets/images/currencies/diamonds.png'),
|
||||
CurrencyTypes::Points->value => asset('assets/images/currencies/points.png'),
|
||||
};
|
||||
}
|
||||
|
||||
public static function toInput(): array
|
||||
{
|
||||
$allCurrencies = self::cases();
|
||||
|
||||
return array_combine(
|
||||
array_column($allCurrencies, 'value'),
|
||||
array_column($allCurrencies, 'name'),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user