Add relations in tables, add saving states for datatables, minor fixes
This commit is contained in:
@@ -15,6 +15,11 @@ class Specie extends Model
|
||||
protected $guarded = ['id'];
|
||||
protected $table = 'botanic_species';
|
||||
|
||||
public function tags()
|
||||
{
|
||||
return $this->morphToMany('App\Models\Shop\Tag', 'taggable');
|
||||
}
|
||||
|
||||
public function Genre()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Botanic\Genre');
|
||||
|
||||
@@ -31,6 +31,11 @@ class Variety extends Model implements HasMedia
|
||||
return $this->morphMany('App\Models\Shop\Article', 'product');
|
||||
}
|
||||
|
||||
public function tags()
|
||||
{
|
||||
return $this->morphToMany('App\Models\Shop\Tag', 'taggable');
|
||||
}
|
||||
|
||||
public function registerMediaConversions(Media $media = null) : void
|
||||
{
|
||||
$this->addMediaConversion('thumb')->fit(Manipulations::FIT_CROP, 32, 32);
|
||||
|
||||
Reference in New Issue
Block a user