Esempio n. 1
0
 /**
  * Returns all the Accounts for logged in user.
  *
  * @return View
  */
 public function getIndex()
 {
     // Get all the user's accounts
     //Auth::id() : gives the logged in userid
     $accounts = $this->accounts->where('user_id', Auth::id())->orderBy('created_at', 'DESC')->paginate(10);
     return View::make('site/account/index', array('accounts' => $accounts));
 }
Esempio n. 2
0
 /**
  * Returns all the Accounts for logged in user.
  *
  * @return View
  */
 public function getIndex()
 {
     // Get all the user's accounts
     //Auth::id() : gives the logged in userid
     $open_tickets = $this->ticket->where('user_id', Auth::id())->where('active', TRUE)->orderBy('created_at', 'DESC')->paginate(10);
     $closed_tickets = $this->ticket->where('user_id', Auth::id())->where('active', FALSE)->orderBy('created_at', 'DESC')->paginate(10);
     if (!Auth::check()) {
         Log::error("Not authorized access");
         return Redirect::to('ticket')->with('error', Lang::get('ticket/ticket.ticket_auth_failed'));
     }
     // var_dump($accounts, $this->accounts, $this->accounts->owner);
     // Show the page
     return View::make('site/ticket/index', array('open_tickets' => $open_tickets, 'closed_tickets' => $closed_tickets));
 }
Esempio n. 3
0
 /**
  * Returns all the Accounts for logged in user.
  *
  * @return View
  */
 public function getIndex()
 {
     // Get all the user's accounts
     $enginelog = $this->enginelog->where('user_id', Auth::id())->orderBy('created_at', 'DESC')->paginate(10);
     return View::make('site/enginelog/index', array('enginelog' => $enginelog));
 }