JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "HasShortUrlAttribute.php"

Full Path: /home/markqprx/iniasli.pro/app-20260222054640/Models/HasShortUrlAttribute.php
File size: 494 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace App\Models;

trait HasShortUrlAttribute
{
    public function getShortUrlAttribute()
    {
        if (
            $this->domain_id &&
            $this->relationLoaded('domain') &&
            $this->domain
        ) {
            $defaultHost = $this->domain->host;
        } else {
            $defaultHost =
                settings('custom_domains.default_host') ?: config('app.url');
        }

        return $defaultHost . '/' . ($this->alias ?: $this->hash);
    }
}