コード例 #1
0
 public function getAllForUserId(User $user)
 {
     return $user->statuses()->latest()->get();
 }
コード例 #2
0
ファイル: StatusRepository.php プロジェクト: akthaw/larabook
 /**
  * Get all statuses associated with a user.
  *
  * @param User $user
  * @return mixed
  */
 public function getAllForUser(User $user)
 {
     return $user->statuses()->with('user')->latest()->get();
 }
コード例 #3
0
 /**
  * Get all Statuses associated witha a user
  *
  * @param $userId
  * @return mixed
  */
 public function getAllForUser(User $user)
 {
     return $user->statuses()->with('user')->latest()->get();
     //orderBy('created_at', 'desc')
 }