作者 lyh

gx

... ... @@ -54,13 +54,8 @@ class RouteMap extends Base
* @date 2023/4/17
*/
public static function generateRoute($title, $source, $source_id, $project_id){
//有中文先翻译
// if(preg_match('/[\x{4e00}-\x{9fa5}]/u', $title)){
// $title = Translate::tran($title, 'en');
// }
// 所有的都需要翻译成为英文
$title = Translate::tran($title, 'en');
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($title, true) . PHP_EOL, FILE_APPEND);
$i=1;
$sign = generateRoute($title);
$info = self::where(['project_id' => $project_id, 'source' => $source, 'source_id'=>$source_id])->first();
... ...