Esempio n. 1
0
 public function destroy(Request $request)
 {
     $id = $request->input('id');
     $result = "删除失败";
     if (Zq::destroy($id)) {
         $result = "删除成功";
     }
     return $result;
 }
Esempio n. 2
0
 public function index()
 {
     $grZqList = Zq::where(['status' => 1, 'types' => 1])->orderBy('id', 'DESC')->paginate(5);
     $gsZqList = Zq::where(['status' => 1, 'types' => 2])->orderBy('id', 'DESC')->paginate(5);
     $fyZqList = Zq::where(['status' => 1, 'types' => 3])->orderBy('id', 'DESC')->paginate(5);
     $newsList = Article::where('cate_id', 1)->orderBy('id', 'DESC')->paginate(3);
     $infoList = Article::where('cate_id', 5)->orderBy('id', 'DESC')->paginate(4);
     $messageList = Article::where('cate_id', 7)->orderBy('id', 'DESC')->paginate(1);
     return view('themes.default.index', ['grZqList' => $grZqList, 'gsZqList' => $gsZqList, 'fyZqList' => $fyZqList, 'messageList' => $messageList, 'newsList' => $newsList, 'infoList' => $infoList]);
 }
Esempio n. 3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return Response
  */
 public function destroy(Request $request)
 {
     $id = $request->input('id');
     $result = "删除失败";
     $zq = Zq::getZqModelById(Apply::find($id)->zid);
     if (Apply::destroy($id)) {
         $result = "删除成功";
         Zq::where('id', $zq->id)->decrement('applys');
     }
     return $result;
 }
Esempio n. 4
0
 public static function getZqTypeByZid($zid)
 {
     $typeName = "";
     $zq = Zq::getZqModelById($zid);
     $types = null;
     if (isset($zq)) {
         $types = $zq->types;
     }
     if ($types == 1) {
         $typeName = "个人债务宝";
     } elseif ($types == 2) {
         $typeName = "企业商帐通";
     }
     if ($types == 3) {
         $typeName = "判决执行宝";
     }
     return $typeName;
 }
Esempio n. 5
0
 public function index()
 {
     $zqList = Zq::where("uid", Auth::member()->get()->id)->orderBy('id', 'DESC')->paginate(10);
     return view('admin.zq.list', ['zqList' => $zqList]);
 }
Esempio n. 6
0
 public function collect(Request $request)
 {
     $zid = $request->input('zid');
     $collect = new Collect();
     $collect->zid = $zid;
     $collect->uid = 1;
     $result = "收藏失败";
     if ($collect->save()) {
         Zq::updateCollectNumber($zid);
         $result = "收藏成功";
     }
     return $result;
 }