public function index()
 {
     $projects = \Auth::user()->getProjects();
     $comments = Feedable::feed(Comment::ofProjects($projects));
     $activities = Feedable::feed(Activity::ofProjects($projects));
     return view('dashboard', ['projects' => $projects, 'activities' => $activities, 'comments' => $comments]);
 }
示例#2
0
 private function GetFeed($eloquent = null, &$onlyData, &$before = null)
 {
     $created = Input::get('created');
     $direction = Input::get('direction') != 'after' ? Feedable::BEFORE : Feedable::AFTER;
     $onlyData = Input::get('created') ? true : false;
     if ($eloquent) {
         return Feedable::feed($eloquent, $created, $direction);
     }
     return true;
 }