Пример #1
0
 /**
  * Determine if the given ad can be refreshed by the user.
  *
  * @param \App\User $user
  * @param \App\Ad $ad
  * @return bool
  */
 public function refresh(User $user, Ad $ad)
 {
     return $user->id === $ad->author_id && $ad->getDaysToRefresh() <= 0;
 }