Exemple #1
0
 /**
  * List all the works
  *
  * @return mixed
  */
 public function index()
 {
     // Check user is logged in
     if (Auth::check()) {
         $works = Work::paginate(6);
         return View::make('works.index')->with('works', $works)->with('entity', 'work')->with('title', 'Works');
     } else {
         // User is not logged in
         Session::flash('message', 'Please log in');
         return Redirect::to('/');
     }
 }