Skip to content

James1985China/webman-tpvalidate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

从TP迁移过来的 添加以下两个函数 可以减少很多修改内容

if (!function_exists('lang')) {
    function lang(string $set, string $lang = null)
    {
        //前台传递es-lang作为语言参数 按照你自己的修改 
        $langset = $lang ?: request()->header('es-lang') ?: env('SYSTEM_LOCAL', 'zh-cn');
        return trans($set, [], null, $langset);
    }
}

if (!function_exists('env')) {
    function env($env, $default = '')
    {
        return getenv($env) ?: $default;
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%