[WIP] Add some classes
This commit is contained in:
@@ -19,6 +19,11 @@ class Genre extends Model
|
||||
return $this->hasMany('App\Models\Botanic\Specie');
|
||||
}
|
||||
|
||||
public function varieties()
|
||||
{
|
||||
return $this->hasManyThrough('App\Models\Botanic\Variety', 'App\Models\Botanic\Specie');
|
||||
}
|
||||
|
||||
public function scopeByName($query,$name)
|
||||
{
|
||||
return $query->where('name', $name);
|
||||
|
||||
Reference in New Issue
Block a user