Minor display fixes, link to old site
This commit is contained in:
@@ -2,25 +2,39 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\Service_Model as Model;
|
||||
use App\Classes\SSL;
|
||||
|
||||
class ServiceSsl extends Model
|
||||
{
|
||||
protected $table = 'ab_service__ssl';
|
||||
|
||||
public function service()
|
||||
{
|
||||
return $this->belongsTo(Service::class);
|
||||
}
|
||||
protected $_o = NULL;
|
||||
|
||||
public function tld()
|
||||
{
|
||||
return $this->belongsTo(DomainTld::class,'domain_tld_id');
|
||||
}
|
||||
|
||||
public function getSSLAttribute()
|
||||
{
|
||||
if (is_null($this->_o))
|
||||
{
|
||||
$this->_o = new SSL;
|
||||
|
||||
if ($this->cert)
|
||||
$this->_o->crt($this->cert);
|
||||
if ($this->csr)
|
||||
$this->_o->csr($this->csr);
|
||||
if ($this->pk)
|
||||
$this->_o->key($this->pk);
|
||||
|
||||
}
|
||||
|
||||
return $this->_o;
|
||||
}
|
||||
|
||||
public function getNameAttribute()
|
||||
{
|
||||
// @todo Merge in SSL functions from old site
|
||||
return 'SSL';
|
||||
return $this->ssl->cn;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user