/** /bands **/ public function viewAll() { $bands = Band::orderBy('name')->get(); foreach ($bands as $band) { $band['eventCount'] = count($band->event); } return view('archive-band', compact('bands')); }
public function dashboard() { $venues = Venue::orderBy('name', 'asc')->get(); $bands = Band::orderBy('name', 'asc')->get(); $events = Event::orderBy('date', 'asc')->get(); $events_future = Event::futureEvents(); $events_past = Event::pastEvents(); return view('dashboard', compact('venues', 'events', 'events_future', 'events_past', 'bands')); }
/** * Display the specified resource. * * @param int $id * @return Response */ public function manage($id) { $event = Event::with('bands', 'manager', 'article')->find($id); if (Auth::user()->id != $event->user_id && Auth::user()->level_id < 3) { Flash::error("Vous n'avez pas les droits suffisants pour ceci."); return Redirect::back(); } $bands = Band::orderBy('name')->paginate(15); return view('events.manage', compact('event', 'bands')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $bands = Band::orderBy('post_title', 'ASC')->get(); return view('bands.archive')->with(compact('bands')); }
/** * Display a listing of the resource. * * @return Response */ public function adminIndex() { $bands = Band::orderBy('name')->with('members', 'events', 'manager', 'article')->paginate(20); return view('admin.bands.index', compact('bands')); }