|
@ -140,16 +140,20 @@ class Item extends Model |
|
|
|
|
|
|
|
|
public function enhanced() |
|
|
public function enhanced() |
|
|
{ |
|
|
{ |
|
|
$details = $this->config(); |
|
|
$details = $this->getconfig(); |
|
|
$class = $details->type; |
|
|
$class = $details->type; |
|
|
$app = new $class; |
|
|
$app = new $class; |
|
|
return (bool)($app instanceof \App\EnhancedApps); |
|
|
return (bool)($app instanceof \App\EnhancedApps); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function config() |
|
|
public function getconfig() |
|
|
{ |
|
|
{ |
|
|
$config = json_decode($this->description); |
|
|
$config = json_decode($this->description); |
|
|
|
|
|
|
|
|
|
|
|
$explode = explode('\\', $config->type); |
|
|
|
|
|
$config->name = end($explode); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$config->url = $this->url; |
|
|
$config->url = $this->url; |
|
|
if(isset($config->override_url) && !empty($config->override_url)) { |
|
|
if(isset($config->override_url) && !empty($config->override_url)) { |
|
|
$config->url = $config->override_url; |
|
|
$config->url = $config->override_url; |
|
|