File: D:/HostingSpaces/SBogers10/rentman2019.komma.pro/app/Komma/SiteConfig/Models/SiteConfig.php
<?php
/**
* @author Komma <info@komma.pro>
* @copyright (c) 2012-2016, Komma
*/
namespace App\Komma\SiteConfig\Models;
use App\Komma\Documents\DocumentsTrait;
use App\Komma\Documents\Kms\DocumentableInterface;
use App\Komma\Kms\Core\Attributes\Models\Traits\HasThumbnailInterface;
use App\Komma\Kms\Core\Attributes\Models\Traits\HasThumbnailTrait;
use App\Komma\Kms\Core\Entities\DisplayNameInterface;
use Illuminate\Database\Eloquent\Model;
class SiteConfig extends Model implements DisplayNameInterface, HasThumbnailInterface, DocumentableInterface
{
use DocumentsTrait;
use HasThumbnailTrait;
protected $table = 'site_config';
protected $class = self::class;
protected $fillable = ['key', 'value'];
/**
* Get the name of this model by model or translation model
*
* @return null|string
*/
public function getDisplayName():?string
{
// First try to get the name of the model
if (isset($this->sidebar_name) && $this->sidebar_name != '') {
return $this->sidebar_name;
}
return null;
}
/**
* @return string
*/
public function getSidebarName():string
{
return $this->getDisplayName();
}
}