public function edit($id) { $curr['name'] = $this->crumb['edit']['name']; $curr['url'] = $this->crumb['edit']['url']; $result = ['data' => ComMainModel::find($id), 'pics' => PicModel::all(), 'crumb' => $this->crumb, 'curr' => $curr]; return view('admin.commain.edit', $result); }
public function show($id) { $curr['name'] = $this->crumb['show']['name']; $curr['url'] = $this->crumb['show']['url']; $result = ['data' => ComFuncModel::find($id), 'modules' => ComModuleModel::all(), 'pics' => PicModel::all(), 'model' => $this->model, 'crumb' => $this->crumb, 'curr' => $curr]; return view('admin.comfunc.show', $result); }
/** * 总编辑窗口 */ public function edit($productid, $layerid = 0, $con_id = 0, $genre = 1) { $curr['name'] = $this->crumb['']['name']; $curr['url'] = $this->crumb['']['url']; $layer = $this->getOneLayer($productid, $layerid); $result = ['product' => ProductModel::find($productid), 'layers' => $this->getLayers($productid), 'layer' => $layer, 'layerModel' => $this->layerModel, 'cons' => $this->getCons($productid, $layer->id), 'content' => $this->getOneCon($productid, $layer->id, $con_id), 'attr' => $this->getOneAttr($productid, $layer->id, $genre), 'attrModel' => $this->attrModel, 'layerAttrModel' => $this->layerAttrModel, 'pics' => PicModel::all(), 'crumb' => $this->crumb, 'curr' => $curr, 'currUrl' => 'edit', 'layerid' => $layer->id, 'con_id' => $con_id, 'attrGenre' => $genre]; return view('admin.proCreation.index', $result); }
public function pics($uid = 0) { if ($uid) { $picModels = PicModel::where('uid', $uid)->get(); } else { $picModels = PicModel::all(); } return $picModels ? $picModels : []; }
/** * 获得某个会员的所有图片 */ public function getUserPics($uid = null) { if ($uid) { $datas = PicModel::where('uid', $uid)->get(); } else { $datas = PicModel::all(); } return $datas; }