/** * Show the aggregated activities from followed users. */ public function aggregated_feed() { $feed = FeedManager::getNewsFeeds(Auth::id())['aggregated']; $enricher = new Enrich(); $activities = $feed->getActivities(0, 25)['results']; $activities = $enricher->enrichAggregatedActivities($activities); return View::make('aggregated_feed', array('activities' => $activities)); }
/** * Show the activities from a users. */ public function profile($username) { $user = User::where('username', '=', $username)->firstOrFail(); $feed = FeedManager::getUserFeed($user->id); $enricher = new Enrich(); $activities = $feed->getActivities(0, 25)['results']; $activities = $enricher->enrichActivities($activities); $follow = Follow::firstOrNew(array('user_id' => Auth::id(), 'target_id' => $user->id)); return View::make('profile', array('profile' => $user, 'activities' => $activities, 'follow' => $follow)); }