예제 #1
0
파일: Team.php 프로젝트: exelv1/Contentify
 /**
  * Select only those that have been published
  *
  * @param Builder $query
  * @return Builder
  */
 public function scopePublished($query)
 {
     return $query->wherePublished(true);
 }
예제 #2
0
파일: News.php 프로젝트: chirilo/Contentify
 /**
  * Select only news that have been published
  *
  * @param Builder $query
  * @return Builder
  */
 public function scopePublished($query)
 {
     return $query->wherePublished(true)->where('published_at', '<=', DB::raw('CURRENT_TIMESTAMP'));
 }