Fix relazioni di base
This commit is contained in:
parent
8f083dcc1c
commit
90853dc483
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue