/** * 初始化搜索表 */ public function init() { //在线创作表 $products = ProductModel::all(); if (count($products)) { $rst['product'] = $this->tochange($products, 'product'); } else { $rst['product'] = "在线创作表 product 没有记录!"; } //上传的产品表 $goods = GoodsModel::all(); if (count($goods)) { $rst['goods'] = $this->tochange($goods, 'goods'); } else { $rst['goods'] = "上传的产品表 goods 没有记录!"; } //创意表 $ideas = IdeasModel::all(); if (count($ideas)) { $rst['idea'] = $this->tochange($ideas, 'idea'); } else { $rst['idea'] = "创意表 idea 没有记录!"; } //分镜表 $storyboards = StoryBoardModel::all(); if (count($ideas)) { $rst['storyboard'] = $this->tochange($storyboards, 'storyboard'); } else { $rst['storyboard'] = "分镜表 storyboard 没有记录!"; } //公司表 $companys = CompanyModel::all(); if (count($ideas)) { $rst['company'] = $this->tochange($companys, 'company'); } else { $rst['company'] = "公司表 company 没有记录!"; } //影视作品表 $works = WorksModel::all(); if (count($works)) { $rst['works'] = $this->tochange($works, 'works'); } else { $rst['works'] = "作品表 works 没有记录!"; } //演员表 $actors = StaffModel::where('genre', 1)->get(); if (count($actors)) { $rst['actor'] = $this->tochange($actors, 'actor'); } else { $rst['actor'] = "人员表演员 actor 没有记录!"; } //租赁表 $rents = RentModel::all(); if (count($rents)) { $rst['rent'] = $this->tochange($rents, 'rent'); } else { $rst['rent'] = "租赁表 rent 没有记录!"; } //设计表 $designs = DesignModel::all(); if (count($designs)) { $rst['design'] = $this->tochange($designs, 'design'); } else { $rst['design'] = "设计表 design 没有记录!"; } dd($rst); }
public function forceDelete($id) { StaffModel::where('id', $id)->delete(); return redirect(DOMAIN . 'member/staff/trash'); }
public function query() { $datas = StaffModel::where('del', 0)->where('isshow', 1)->orderBy('sort', 'desc')->orderBy('id', 'desc')->paginate($this->limit); $datas->limit = $this->limit; return $datas; }