来源:https://blog.csdn.net/qq_41241684/article/details/87866416

所以我改成这样:

$paperTypeModel = new PaperType();
        $seach = Request::get('seach');
        $where = array();
        if (!empty($seach))
        {
            $where[] = ['name', 'like', '%'.$seach."%"];
        }
        $list = $paperTypeModel::where($where) -> where(['if_delete'=>1])
                                ->paginate(15)-> each(function ($item, $key){
                $item->statusName = $this->status[$item->status];
        });

 

相关文章:

  • 2022-02-03
  • 2021-06-20
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-04-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
相关资源
相似解决方案