Esempio n. 1
0
 /**
  * @param Builder $query
  */
 public function scopePending(Builder $query)
 {
     $query->whereStatus(static::STATUS_PENDING);
 }
 /**
  * @param Builder $query
  */
 public function scopeActive(Builder $query)
 {
     $query->whereStatus(static::ACTIVE);
 }
Esempio n. 3
0
 /**
  * Check if the post is unpublish
  * @param Builder $query
  * @return bool
  */
 public function scopeUnpublished(Builder $query)
 {
     return (bool) $query->whereStatus(3);
 }
Esempio n. 4
0
 /**
  * Query scope for rejected confessions
  * @param  \Illuminate\Database\Eloquent\Builder $query
  * @return \Illuminate\Database\Eloquent\Builder
  */
 public function scopeRejected($query)
 {
     return $query->whereStatus('Rejected');
 }