cleaning day
This commit is contained in:
@@ -4,6 +4,9 @@ namespace App\Models\Shop;
|
||||
|
||||
use App\Traits\Model\Imageable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Kirschbaum\PowerJoins\PowerJoins;
|
||||
use Rinvex\Tags\Traits\Taggable;
|
||||
@@ -28,17 +31,17 @@ class Merchandise extends Model implements HasMedia
|
||||
'plus',
|
||||
];
|
||||
|
||||
public function Articles()
|
||||
public function Articles(): MorphMany
|
||||
{
|
||||
return $this->morphMany(Article::class, 'product');
|
||||
}
|
||||
|
||||
public function Producer()
|
||||
public function Producer(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Producer::class);
|
||||
}
|
||||
|
||||
public function tags()
|
||||
public function tags(): MorphToMany
|
||||
{
|
||||
return $this->morphToMany(Tag::class, 'taggable');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user