AHeadFoot.php
1.1 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
namespace App\Models\Template;
/**
* 头部底部
* @author:dc
* @time 2023/5/4 15:52
* Class AHeadFoot
* @package App\Models\Template
*/
class AHeadFoot extends \App\Models\Base{
protected $table = 'gl_aside_template_header_footer';
// 分开存 头底 为了方便后期可能会 改版为 随意搭配 头底部
const TYPE_HEADER = 'H';
const TYPE_FOOTER = 'F';
const STATUS_ACTIVE = 1;
const STATUS_DISABLED = 0;
const IS_DEFAULT = 1;
/**
* b 端 查询
* @return mixed
* @author:dc
* @time 2023/5/4 16:24
*/
public static function _ball(){
return static::where('status',static::STATUS_ACTIVE)->orderBy('sort')->get(['id','name','type','html','is_default']);
}
/**
* b 端 读取默认的一个头部底部
* @return mixed
* @author:dc
* @time 2023/5/4 16:51
*/
public static function _bDefault(){
return static::where(['status'=>static::STATUS_ACTIVE,'is_default'=>static::IS_DEFAULT])
->get(['type','html'])
->pluck('html','type')
->toArray();
}
}