Fix relazioni di base

This commit is contained in:
Thomas Zilio 2018-10-26 16:22:47 +02:00
parent 8f083dcc1c
commit 90853dc483
3 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ class MailTemplate extends Model
$dbo = $database = database();
// Lettura delle variabili del modulo collegato
$variables = include $this->module()->filepath('variables.php');
$variables = include $this->module->filepath('variables.php');
return (array) $variables;
}

View File

@ -42,7 +42,7 @@ class Plugin extends Model
*/
public function getPermissionAttribute()
{
return $this->originalModule()->permission;
return $this->originalModule->permission;
}
public function getOptionAttribute()
@ -63,7 +63,7 @@ class Plugin extends Model
return;
}
$directory = 'modules/'.$this->originalModule()->directory.'|custom|/plugins';
$directory = 'modules/'.$this->originalModule->directory.'|custom|/plugins';
return App::filepath($directory, $this->script);
}

View File

@ -26,6 +26,6 @@ class PrintTemplate extends Model
public function module()
{
return $this->belongsTo(Module::class, 'id_module')->first();
return $this->belongsTo(Module::class, 'id_module');
}
}