예제 #1
0
파일: User.php 프로젝트: bohap/online-study
 /**
  * Get all the courses the are created by the followed user.
  *
  * @param $query
  * @return mixed
  */
 public function scopeFollowedCourses($query)
 {
     return $query->join(Course::table(), $this->getFollowedForeignKey(), '=', Course::userForeignKeyName());
 }