Exemplo n.º 1
1
 /**
  * @param Builder|\Illuminate\Database\Eloquent\Builder|Model $query
  * @return mixed
  */
 public function scopeVisible($query)
 {
     return $query->whereHas('profile', function ($query) {
         /** @var Profile $query */
         return $query->visible();
     });
 }