mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
23 lines
519 B
PHP
23 lines
519 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class Language extends NexusModel
|
|
{
|
|
const DEFAULT_ENABLED = ['en', 'chs', 'cht'];
|
|
|
|
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);
|
|
}
|
|
}
|