Add new version in repository

This commit is contained in:
Ludovic CANDELLIER
2021-07-25 23:19:27 +02:00
parent f75632b054
commit b879f11c99
608 changed files with 12235 additions and 7513 deletions

View File

@@ -3,20 +3,24 @@
namespace App\Models\Botanic;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Wildside\Userstamps\Userstamps;
class Genre extends Model
{
use SoftDeletes, Userstamps;
protected $guarded = ['id'];
protected $table = 'botanic_genres';
public function family()
{
return $this->belongsTo('App\Models\Botanic\Family');
return $this->belongsTo('App\Models\Botanic\Family');
}
public function species()
{
return $this->hasMany('App\Models\Botanic\Specie');
return $this->hasMany('App\Models\Botanic\Specie');
}
public function varieties()
@@ -24,9 +28,8 @@ class Genre extends Model
return $this->hasManyThrough('App\Models\Botanic\Variety', 'App\Models\Botanic\Specie');
}
public function scopeByName($query,$name)
public function scopeByName($query, $name)
{
return $query->where('name', $name);
return $query->where('name', $name);
}
}
}