HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers54/csbinstallatietechniek.nl/app/Base/HasHeroImagesTrait.php
<?php


namespace App\Base;


use Illuminate\Database\Eloquent\Relations\MorphMany;
use Komma\KMS\Documents\Models\Document;

trait HasHeroImagesTrait
{
    /**
     * Get the images through documents belonging to this model
     *
     * @return \Illuminate\Database\Eloquent\Relations\hasMany
     */
    public function heroImages():MorphMany
    {
        return $this->morphMany(Document::class, 'documentable')
            ->where('key', '=', 'Documents-hero')
            ->orderBy('sort_order');
    }
}