Add varieties
This commit is contained in:
@@ -13,4 +13,15 @@ class Specie extends Model
|
||||
{
|
||||
return $this->belongsTo('App\Models\Shop\Family');
|
||||
}
|
||||
|
||||
public function Varieties()
|
||||
{
|
||||
return $this->hasMany('App\Models\Shop\Variety');
|
||||
}
|
||||
|
||||
public function scopeByName($query,$name)
|
||||
{
|
||||
return $query->where('name', $name);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user