Esempio n. 1
0
 /**
  * Dashboard for user's content management, only for auth user.
  */
 public function dashboard()
 {
     $user = Sentry::getUser();
     $added_events = ep\Event::where('author_id', '=', $user->id)->orderBy('created_at', 'DESC')->paginate(25);
     $added_shows = Show::where('author_id', '=', $user->id)->orderBy('created_at', 'DESC')->paginate(25);
     return View::make('user.dashboard', array('user' => $user, 'added_events' => $added_events, 'added_shows' => $added_shows, 'pageTitle' => 'Dashboard'));
 }
Esempio n. 2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $users = User::all();
     $events_submitted = ep\Event::where('approved', '=', '0')->get();
     $event_count = ep\Event::all()->count();
     $shows_submitted = Show::where('approved', '=', '0')->get();
     $show_count = Show::all()->count();
     $extras_submitted = Extra::where('approved', '=', '0')->get();
     $extra_count = Extra::all()->count();
     $beta_count = DB::table('beta_newsletters')->count();
     return View::make('admin.admin_panel', array('pageTitle' => 'Admin Panel', 'users' => $users, 'event_count' => $event_count, 'events_submitted' => $events_submitted, 'show_count' => $show_count, 'shows_submitted' => $shows_submitted, 'extra_count' => $extra_count, 'beta_count' => $beta_count, 'extras_submitted' => $extras_submitted));
 }
Esempio n. 3
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     if (Sentry::check()) {
         $show = Show::where('id', '=', $id)->orWhere('slug', '=', $id)->first();
         $stream = $show->showStream()->first();
         $games = $show->showGame()->get();
         return View::make('show.show_show_tz', array('pageTitle' => $show->title, 'show' => $show, 'stream' => $stream, 'games' => $games));
     }
     $show = Show::where('id', '=', $id)->orWhere('slug', '=', $id)->first();
     $stream = $show->showStream()->first();
     $games = $show->showGame()->get();
     return View::make('show.show_show', array('pageTitle' => $show->title, 'show' => $show, 'stream' => $stream, 'games' => $games));
 }