public function category($category) { //$venues = \Venues::on('sqlite')->whereCategory(\Input::get('category'))->get(); $venues = Venues::where('category', $category)->get(); //dd($venues); return View::make('venues', ['venues' => $venues]); }
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 remove($id) { try { //dd($id); //$venue = Venues::where('id', '=', $id)->get(); $venue = Venues::find($id); $venue->delete(); return View::make('admin.venues.delete', ['status' => 'successful', 'venue' => $venue, 'venues' => Venues::all(), 'id' => $id]); } catch (Illuminate\Database\Eloquent\ModelNotFoundException $e) { return View::make('admin.venues.delete', ['status' => 'unsuccessful', 'venue' => $venue, 'id' => $id]); } }