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/SBogers70/inter-mill.com/app/Komma/SimplePages/models/SimplePageTranslation.php
<?php

/**
 * Short description for the file.
 *
 * @author      Komma <support@komma.pro>
 * @copyright   (c) 2012-2015, Komma Mediadesign
 */

namespace Komma\SimplePages\Models;

class SimplePageTranslation extends \Komma\Kms\SimplePages\Models\SimplePageTranslation
{
    public $kmsClass = 'Komma\\Kms\\SimplePages\\Models\\SimplePageTranslation';

    /**
     * Get the route from the current translation
     *
     * @return Collection
     */
    public function route()
    {
        /**
         * On the Route model is an MorphTo relation
         * By using a hasOne relation:
         * where the routable_type is filled in with the KmsClass
         * And the routable_id is set as the foreign_id,
         * we can collect the route of the given model directly.
         *
         */
        return $this->hasOne('Komma\Routes\Models\Route', 'routable_id')
            ->where('routable_type', '=', $this->kmsClass);
    }
}