CustomModuleContent.php
768 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* @remark :
* @name :CustomModuleContent.php
* @author :lyh
* @method :post
* @time :2023/11/6 10:04
*/
namespace App\Models\CustomModule;
use App\Helper\Arr;
use App\Models\Base;
class CustomModuleContent extends Base
{
protected $table = 'gl_custom_module_content';
//连接数据库
protected $connection = 'custom_mysql';
public function getCategoryIdAttribute($value){
return explode(',',trim($value,','));
}
/**
* @remark :视频
* @name :getVideoAttribute
* @author :lyh
* @method :post
* @time :2024/1/23 14:31
*/
public function getVideoAttribute($value){
if(!empty($value)){
$value = Arr::s2a($value);
}
return $value;
}
}