public function index() { if (Auth::user() && Auth::user()->role == 'customer') { $downloads = Download::all(); return View::make('downloads.index')->with('downloads', $downloads); } elseif (Auth::user() && Auth::user()->role == 'administrator') { $users = User::all(); return View::make('users.index')->with('users', $users); } return View::make('login'); }
/** * Show list of current available downloads * * @return mixed */ public function manageDownloads() { $downloads = Download::all(); return View::make('admin.downloads', compact('downloads')); }
/** * Show the file download page * * @return Response */ public function index() { $downloads = Download::all(); return View::make('downloads.index', compact('downloads')); }