Exemplo n.º 1
0
 /**
  * Show all of the message threads to the user
  *
  * @return mixed
  */
 public function index()
 {
     $currentUserId = Auth::user()->id;
     // All threads, ignore deleted/archived participants
     $threads = Thread::getAllLatest()->get();
     return $threads;
     // All threads that user is participating in
     // $threads = Thread::forUser($currentUserId)->latest('updated_at')->get();
     // All threads that user is participating in, with new messages
     // $threads = Thread::forUserWithNewMessages($currentUserId)->latest('updated_at')->get();
     //return View::make('messenger.index', compact('threads', 'currentUserId'));
 }