| xqd
@@ -18,16 +18,16 @@ class UserVipRecordController extends AdminController
|
|
|
protected function grid()
|
|
|
{
|
|
|
return Grid::make(UserVipRecord::with(['user.info','combo']), function (Grid $grid) {
|
|
|
- $grid->model()->where('status',1);
|
|
|
+ $grid->model()->where('status',1)->orderByDesc('created_at');;
|
|
|
$grid->column('id')->sortable();
|
|
|
$grid->column('pay_id');
|
|
|
$grid->column('user_id')->display(function () {
|
|
|
$str = "";
|
|
|
$str .= "<div style='margin-right:10px;display: flex;align-items: center'>";
|
|
|
- $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" onerror="this.src=\'https://fourtiao.oss-cn-beijing.aliyuncs.com/zhangsiye/images/6b40343b27263be34cf3212bf44f74c3.png\'" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
|
|
|
+ $str .= '<img data-action="preview-img" src="' . @$this->user->avatar . '" onerror="this.src=\'https://fourtiao.oss-cn-beijing.aliyuncs.com/zhangsiye/images/6b40343b27263be34cf3212bf44f74c3.png\'" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
|
|
|
$str .= '<div>';
|
|
|
- $str .= '<p style="margin-bottom: 5px">' . $this->user->nickname . '</p>';
|
|
|
- $str .= '<p style="margin-bottom: 0px">' . $this->user->mobile . '</p>';
|
|
|
+ $str .= '<p style="margin-bottom: 5px">' . @$this->user->nickname . '</p>';
|
|
|
+ $str .= '<p style="margin-bottom: 0px">' . @$this->user->mobile . '</p>';
|
|
|
$str .= "</div>";
|
|
|
$str .= "</div>";
|
|
|
return $str;
|