public function buyerAlreadybrand(){
        $effect = Request::get('effect');
        $data = $this->brand->where(function($query) use($effect){
            if($effect == -1){
               return $query->where('effectivetime','<',date('Y-m-d'));
            }else{
               return $query->where('pur_date','<=',date('Y-m-d'));
            }
        })->orderby('pur_date','desc')->get();
        return View::make('member::publish.buyer_alreadybrand', compact('data'))->withEffect($effect);
    }
<li class="@if(!$effect) active @endif"><a href="?">已发布</a></li>
<li class="@if($effect == -1 ) active @endif"><a href="?effect=-1">已过期</a></li>

相关文章:

  • 2021-10-22
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-08-06
  • 2021-11-28
  • 2022-12-23
  • 2021-11-28
相关资源
相似解决方案