예제 #1
0
 public function add_download($username)
 {
     if (Auth::user() && Auth::user()->role == 'administrator') {
         $user = User::where('username', '=', $username)->first();
         $downloads = Download::lists('dname', 'did');
         // $download = UserUpload::where('fid', '=', $any)->first();
         $adds = Add::where('did_id', '=', Download::lists('did'));
         return View::make('users.add_download')->with('user', $user)->with('downloads', $downloads)->with('adds', $adds);
     }
     return Redirect::to('login');
 }