/** * Display a listing of the activities. * * @return Response */ public function index(ActivitiesRepo $repo) { $activities = $repo->getAll(); return view('admin.activities.index', compact('activities')); }
public function loadMoreActivities(ActivitiesRepo $activities_repo) { $activities = $activities_repo->getAll(10); return ['layout' => view('home.partials.activities-partial', compact('activities'))->render(), 'url' => str_replace('/?', '?', $activities->nextPageUrl()), 'more' => $activities->hasMorePages(), 'galleries' => view('home.partials.gallery-partial-main', compact('activities'))->render()]; }