PHP code example of james1985 / webman-tpvalidate
1. Go to this page and download the library: Download james1985/webman-tpvalidate library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
james1985 / webman-tpvalidate example snippets
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;
}
}