/** * Retrieve all Activities. * * @param Request $request * @return Collection|Response */ function index(Request $request) { try { return Activity::all(); } catch (Exception $e) { return response()->error(); } }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $activities = Models\Activity::all(); return view('admin.activity.index', compact('activities')); }