public scopeWithUniqueSlugConstraints ( |
||
$query | ||
$model | ||
$attribute | string | |
$config | array | |
$slug | string | |
Résultat |
public function scopeWithUniqueSlugConstraints(Builder $query, Model $model, $attribute, $config, $slug)
{
$author = $model->author;
return $query->where('author_id', $author->getKey());
}