Example #1
0
 public function atest($id = 14)
 {
     $cate = new Category();
     echo $cate->InitClassSelectOption(0, 0);
     exit;
     echo CUtf8_PY::encode("家用电器");
     exit;
     $demand = Demand::findOrFail($id);
     $cattree = $this->InitClassSelectOption(0, $demand->category_id);
     $cates = Category::where('parent_id', '=', 0)->orderby('id', 'desc')->get();
     $user = User::whereRaw('id=' . $demand->user_id)->get()->first();
     $dc = new DemandController();
     $bidinfo = $bidinfo = $dc->getbidinfo($demand);
     $deli = delivery::whereRaw('deid=' . $demand->id)->get()->first();
     $data = array('demand' => $demand, 'cates' => $cates, 'user' => $user, 'bids' => $bidinfo['bids'], 'bidinfo' => $bidinfo, 'deli' => $deli, 'catetree' => $cattree);
     return view("admin.edemand1")->with($data);
 }