Exemplo n.º 1
0
 /**
  *  get_index checks if the user is logged in already, if not, it shows a default home page with options to 
  *	login or sign up, if logged in it will show a critter feed from all other users in the system
  */
 public function get_index()
 {
     if (Auth::guest()) {
         return View::make('home.index');
     } else {
         $critts = Critt::with('user')->order_by('created_at', 'desc')->paginate(10);
         $count = Critt::count();
         return View::make('home.critterfeed')->with('count', $count)->with('critts', $critts);
     }
 }