/**
  * User must not subscribe lesson and not be the owner.
  *
  * @param User $user
  * @param Lesson $lesson
  * @return bool
  */
 public function subscribe(User $user, Lesson $lesson) : bool
 {
     return Lesson::whereId($lesson->id)->where('lessons.owner_id', '!=', $user->id)->where('lessons.visibility', '=', 'public')->whereNotIn('lessons.id', $user->subscribedLessons()->pluck('id'))->exists();
 }