MCPcopy Create free account
hub / github.com/CoderOpen/waimai / Link

Class Link

app/Models/ChiHe/Link.php:11–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10
11class Link extends Model
12{
13
14 protected $table = 'link';
15 //protected $connection = 'common';
16 protected $fillable = [
17 'id',
18 'local_app_id',
19 'app_id',
20 'created_at',
21 'logo',
22 'status',
23 'app_name',
24 'description',
25 'path',
26 'sort',
27 'updated_at'
28 ];
29
30 //const UPDATED_AT = null;
31
32 //const UPDATED_AT = null;
33 static function showStatus($type = null)
34 {
35 $map = [
36 1 => '显示',
37 2 => '隐藏',
38 ];
39
40 if ($type) {
41 return $map[$type] ?? '';
42 }
43 return $map;
44 }
45
46 /**
47 * 获取设置
48 */
49 function getLogoAttribute($value)
50 {
51 if (strpos($value,'http') === false) {
52 return url('/') . '/storage/'. $value;
53 } else {
54 return $value;
55 }
56
57 }
58
59
60 /**
61 * 设置
62 */
63 function set()
64 {
65
66 }
67}
68

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected