Beispiel #1
0
 public function getApply(Request $request)
 {
     /**
             $types =  $request->input('types');
             $paramArr = ["uid"=>1];
             if(!is_null($types)){
                 $paramArr = array_merge($paramArr,["types"=>$types]);
             }**/
     return view('member.index.apply', ['appList' => Apply::where("uid", 1)->orderBy('id', 'DESC')->paginate(10)]);
 }
Beispiel #2
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;
 }
Beispiel #3
0
 public function apply(Request $request)
 {
     $zid = $request->input('zid');
     $applyList = Apply::getApplyListByZid($zid);
     return view('admin.zq.apply', ['applyList' => $applyList]);
 }
Beispiel #4
0
 public function apply(Request $request)
 {
     $zid = $request->input('zid');
     $apply = new Apply();
     $apply->zid = $zid;
     $apply->uid = 1;
     $result = "申请失败";
     if ($apply->save()) {
         Zq::updateAppNumber($zid);
         $result = "申请成功";
     }
     return $result;
 }