Files
nexusphp/app/Models/Language.php
T

23 lines
519 B
PHP
Raw Normal View History

2021-04-28 19:44:48 +08:00
<?php
namespace App\Models;
class Language extends NexusModel
{
const DEFAULT_ENABLED = ['en', 'chs', 'cht'];
2021-04-28 19:44:48 +08:00
protected $table = 'language';
protected $fillable = [
'lang_name', 'site_lang_folder',
];
public static function listEnabled($withoutCache = false)
{
if ($withoutCache) {
return Setting::getFromDb('main.site_language_enabled', self::DEFAULT_ENABLED);
}
return Setting::get('main.site_language_enabled', self::DEFAULT_ENABLED);
}
2021-04-28 19:44:48 +08:00
}