ctrlpanel/app/Settings/PterodactylSettings.php

39 lines
706 B
PHP
Raw Normal View History

2023-02-02 15:45:17 +00:00
<?php
2023-02-06 20:16:54 +00:00
namespace App\Settings;
2023-02-02 15:45:17 +00:00
use Spatie\LaravelSettings\Settings;
class PterodactylSettings extends Settings
{
public string $admin_token;
public string $user_token;
public string $panel_url;
public int $per_page_limit;
public static function group(): string
{
return 'pterodactyl';
}
public static function encrypted(): array
{
return [
'admin_token',
'user_token'
];
}
/**
* Get url with ensured ending backslash
*
* @return string
*/
public function getUrl(): string
{
return str_ends_with($this->panel_url, '/') ? $this->panel_url : $this->panel_url . '/';
}
2023-02-02 15:45:17 +00:00
}