"" .
public function scopePublished($query, $negate = false) {
return ($negate ? $query->where('published', false) : $query->where('published', true));
}
, , $post->published()... , $post->published(true)...
, :
public function scopePublished($query, $override = true) {
return $query->where('published', $override);
}
: $post->published()...
: $post->published(false)...