public function index() { if (Auth::check()) { $bands = Bands::all(); $advertisers = Advertisers::all(); $writers = Writers::all(); $venues = Venues::all(); return View::make('admin.index', ['bands' => $bands, 'advertisers' => $advertisers, 'writers' => $writers, 'venues' => $venues]); } else { return Redirect::to('/admin/login'); } }
public function show($id) { $band = Bands::find($id); return View::make('musicshow', ['band' => $band]); }
public function remove($id) { if (Input::has('confirmed_delete')) { try { //$band = Bands::where('id', '=', $id)->get(); $band = Bands::find($id); Bands::where('id', '=', $id)->delete(); return Redirect::to('admin/bands/'); } catch (Illuminate\Database\Eloquent\ModelNotFoundException $e) { return View::make('admin.bands.delete', ['status' => 'unsuccessful', 'band' => $band, 'id' => $id]); } } }