Exemplo n.º 1
0
 /**
  * Find all repos a user can view.
  *
  * @param \StyleCI\StyleCI\Models\User $user
  * @param bool                         $admin
  *
  * @return \Illuminate\Database\Eloquent\Collection
  */
 public function allByUser(User $user, $admin = false)
 {
     return Repo::whereIn('id', array_keys($this->repos->get($user, $admin)))->orderBy('name', 'asc')->get();
 }