module->permission; } public function execute() { $class = $this->class; $hook = new $class(); $this->processing = true; $this->save(); $data = $hook->manage(); $results = $hook->response($data); $this->processing = false; $this->save(); return $results; } public function prepare() { $class = $this->class; $hook = new $class(); $results = $hook->prepare(); return $results; } /* Relazioni Eloquent */ public function module() { return $this->belongsTo(Module::class, 'id_module'); } protected static function boot() { parent::boot(); static::addGlobalScope('enabled', function (Builder $builder) { $builder->where('enabled', true); }); } }