Add filters

This commit is contained in:
Ludovic CANDELLIER
2021-11-01 23:42:53 +01:00
parent e8d503b65d
commit eb0c9444bc
18 changed files with 148 additions and 35 deletions

View File

@@ -19,4 +19,9 @@ class ArticleNature extends Model
{
return $this->hasMany(Article::class);
}
public function scopeByArticleNature($query, $id)
{
return $query->where($this->table . '.id', $id);
}
}