作者 lyh

gx

... ... @@ -38,7 +38,7 @@ class CustomModuleContentController extends BaseController
foreach ($lists as $k=>$v){
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($v, true) . PHP_EOL, FILE_APPEND);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($v['category_id'], true) . PHP_EOL, FILE_APPEND);
$v['category_name'] = $this->categoryName($v['category_id'],$data);
// $v['category_name'] = $this->categoryName($v['category_id'],$data);
$v['image_link'] = getImageUrl($v['image']);
$v['operator_name'] = (new User())->getName($v['operator_id']);
$lists[$k] = $v;
... ...
... ... @@ -18,7 +18,7 @@ class CustomModuleContent extends Base
//连接数据库
protected $connection = 'custom_mysql';
public function getCategoryIdAttribute($value){
return explode(',',trim($value,','));
}
// public function getCategoryIdAttribute($value){
// return explode(',',trim($value,','));
// }
}
... ...