mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-13 16:03:04 +00:00
1. 修复节点信息获取错误的问题 2. 优化首页公告显示 3. 修复回复工单时按回车导致报错的问题 4. 修改用户编辑与添加排版 5. 修复潜在的IE兼容问题 6. 统一Table元素格式 7. 优化返利界面 8. 添加了封禁时间倒计时 9. 对非付费用户,首页添加提示购买宣传语
62 lines
1.2 KiB
PHP
62 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Models;
|
|
|
|
use Eloquent;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* 订阅设备列表
|
|
* Class Device
|
|
*
|
|
* @package App\Http\Models
|
|
* @mixin Eloquent
|
|
*/
|
|
class Device extends Model
|
|
{
|
|
protected $table = 'device';
|
|
protected $primaryKey = 'id';
|
|
public $timestamps = FALSE;
|
|
|
|
function getTypeLabelAttribute()
|
|
{
|
|
switch($this->attributes['type']){
|
|
case 1:
|
|
$type_label = '<span class="label label-danger"> Shadowsocks(R) </span>';
|
|
break;
|
|
case 2:
|
|
$type_label = '<span class="label label-danger"> V2Ray </span>';
|
|
break;
|
|
default:
|
|
$type_label = '<span class="label label-default"> 其他 </span>';
|
|
}
|
|
|
|
return $type_label;
|
|
}
|
|
|
|
function getPlatformLabelAttribute()
|
|
{
|
|
switch($this->attributes['platform']){
|
|
case 1:
|
|
$platform_label = '<i class="fa fa-apple"></i> iOS';
|
|
break;
|
|
case 2:
|
|
$platform_label = '<i class="fa fa-android"></i> Android';
|
|
break;
|
|
case 3:
|
|
$platform_label = '<i class="fa fa-apple"></i> Mac';
|
|
break;
|
|
case 4:
|
|
$platform_label = '<i class="fa fa-windows"></i> Windows';
|
|
break;
|
|
case 5:
|
|
$platform_label = '<i class="fa fa-linux"></i> Linux';
|
|
break;
|
|
case 0:
|
|
default:
|
|
$platform_label = '其他';
|
|
}
|
|
|
|
return $platform_label;
|
|
}
|
|
} |