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/SBogers10/rentman.komma.pro/app/Komma/Updates/Models/UpdateTranslation.php
<?php

namespace Komma\Updates\Models;


class UpdateTranslation extends \Komma\Kms\Updates\Models\UpdateTranslation
{

    public $kmsClass = 'Komma\\Kms\\Updates\\Models\\UpdateTranslation';

    public function rentmanUpdate()
    {
        return $this->belongsTo('Komma\Updates\Models\Update', 'update_id', 'id');
    }

    /**
     * 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);
    }

}