Add new version in repository
This commit is contained in:
@@ -6,21 +6,21 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Package extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
protected $table = 'shop_packages';
|
||||
protected $guarded = ['id'];
|
||||
protected $table = 'shop_packages';
|
||||
|
||||
public function article_family()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Shop\ArticleFamily');
|
||||
}
|
||||
public function article_family()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Shop\ArticleNature');
|
||||
}
|
||||
|
||||
public function unities()
|
||||
{
|
||||
return $this->hasMany('App\Models\Shop\Unity');
|
||||
}
|
||||
public function unities()
|
||||
{
|
||||
return $this->hasMany('App\Models\Shop\Unity');
|
||||
}
|
||||
|
||||
public function scopeByArticleFamily($query, $id)
|
||||
{
|
||||
return $query->where('article_family_id', $id);
|
||||
}
|
||||
public function scopeByArticleNature($query, $id)
|
||||
{
|
||||
return $query->where('article_family_id', $id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user