Exemplo n.º 1
0
 /**
  * @return \Illuminate\Routing\Route|null|string
  */
 public function ingnoreId()
 {
     $id = $this->route('commodity');
     $name = $this->input('name');
     $metric_id = $this->input('metric_id');
     return Commodity::where(compact('id', 'name', 'metric_id'))->exists() ? $id : '';
 }
Exemplo n.º 2
0
 public function yiyuanIndex()
 {
     $customer = \Helper::getCustomer();
     // \Log::info('Location-yiyuan---'.$customer  );
     //      if ($customer->yikangQuestionnaire()->first() == null) {
     // // \Log::info('yiyuan---不存在用户' );
     //          return redirect('/questionnaire2');
     //      }
     //      if ($customer->hasPurchesedOneSale()) {
     // // \Log::info('yiyuan---已购买过' );
     //          return '<a style="font-size: 50px;display:block;width: 100%;margin: 20% auto;text-align: center;">每人仅能参加一次活动!</a>';
     //      }
     // \Log::info('yiyuan---进入一元专区' );
     //		 $jssdk = new Jssdk(env('WX_APPID'), env('WX_SECRET'));
     //		 $signPackage = $jssdk->getSignPackage();
     return view('shop.yiyuan-index')->with(['items' => Commodity::where('special_sale', '=', '1元专区')->with('images')->orderBy('priority', 'desc')->get()]);
 }