Exemplo n.º 1
0
Arquivo: home.php Projeto: ajb/rfpez
 public function action_index()
 {
     if (Auth::check()) {
         if (Auth::user()->officer) {
             Session::reflash();
             return Redirect::to_route('my_projects');
         } else {
             Session::reflash();
             if (Auth::user()->vendor && Bid::where_vendor_id(Auth::vendor()->id)->count()) {
                 return Redirect::to_route('my_bids');
             } else {
                 return Redirect::to_route('projects');
             }
         }
     } else {
         $view = View::make('home.index_signed_out');
     }
     $this->layout->content = $view;
 }
Exemplo n.º 2
0
Arquivo: bids.php Projeto: ajb/rfpez
 public function action_mine()
 {
     $view = View::make('bids.mine');
     $view->bids = Bid::where_vendor_id(Auth::vendor()->id)->get();
     $this->layout->content = $view;
 }