/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $event = ShelterEvent::find($id); if ($event) { $event->delete(); return Redirect::back()->with('message', FlashMessage::DisplayAlert('Event deleted successfully!', 'success')); } }
/** * @return Response::json */ public function AllEvents() { $allevents = ShelterEvent::all(); return Response::json($allevents); }