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/somerenslust.komma.pro/app/KommaApp/Images/Models/Image.php
<?php  namespace App\KommaApp\Images\Models;

use Illuminate\Database\Eloquent\Model;

/**
 *
 *
 * @author      Komma <info@komma.pro>
 * @copyright   (c) 2012-2016, Komma
 */

class Image extends Model
{
    protected $table = 'images';
    protected $fillable = ['original_image_url', 'large_image_url', 'medium_image_url', 'small_image_url', 'thumb_image_url', 'imageable_type', 'imageable_id'];

    public function imageable()
    {
        return $this->morphTo();
    }


    public function __get($key)
    {
        if($key == "small") {
            return $this->small_image_url;
        }

        if($key == "medium") {
            return $this->medium_image_url;
        }

        if($key == "large") {
            return $this->large_image_url;
        }

        if($key == "original") {
            return $this->original_image_url;
        }

        return parent::__get($key);
    }

}