/home/techb158/immovalet.com/vendor/botble/platform/acl/src/Models
NameSizeModeActions
Activation.php4180644editdlrm
Role.php19940644editdlrm
User.php56670644editdlrm
UserMeta.php14950644editdlrm
Edit: /home/techb158/immovalet.com/vendor/botble/platform/acl/src/Models/Role.php (1994B)
'json', ]; /** * @param string $value * @return array */ public function getPermissionsAttribute($value) { try { return json_decode($value, true) ?: []; } catch (Exception $exception) { return []; } } /** * Set mutator for the "permissions" attribute. * * @param array $permissions * @return void */ public function setPermissionsAttribute(array $permissions) { $this->attributes['permissions'] = $permissions ? json_encode($permissions) : ''; } /** * {@inheritDoc} */ public function delete() { if ($this->exists) { $this->users()->detach(); } return parent::delete(); } /** * @return BelongsToMany */ public function users() { return $this->belongsToMany(User::class, 'role_users', 'role_id', 'user_id')->withTimestamps(); } /** * @return BelongsTo */ public function author() { return $this->belongsTo(User::class, 'created_by')->withDefault(); } }