<?php

namespace App\Traits;

use App\Models\Gallery;
use Illuminate\Database\Eloquent\Relations\MorphMany;

trait HasGallery
{
    public function gallery(): MorphMany
    {
        return $this->morphMany(Gallery::class, 'galleryable')->orderBy('order')->orderBy('id');
    }
}
