@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | parent::boot(); |
| 45 | 45 | |
| 46 | - static::saved(function ($model) { |
|
| 46 | + static::saved(function($model) { |
|
| 47 | 47 | $model->clearCaches(); |
| 48 | 48 | }); |
| 49 | 49 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | protected function getRolesCacheKey(): string |
| 113 | 113 | { |
| 114 | - return $this->getGeneralCacheKey() . '.roles'; |
|
| 114 | + return $this->getGeneralCacheKey().'.roles'; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | public function clearRolesCache(): bool |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | return $this->getRelationValue('roles'); |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - $roles = Cache::remember($this->getRolesCacheKey(), now()->addHour(), function () { |
|
| 128 | + $roles = Cache::remember($this->getRolesCacheKey(), now()->addHour(), function() { |
|
| 129 | 129 | $this->loadMissing('roles.permissions'); |
| 130 | 130 | return $this->getRelationValue('roles'); |
| 131 | 131 | }); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | |
| 142 | 142 | protected function getPermissionsCacheKey(): string |
| 143 | 143 | { |
| 144 | - return $this->getGeneralCacheKey() . '.permissions'; |
|
| 144 | + return $this->getGeneralCacheKey().'.permissions'; |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | public function clearPermissionsCache(): bool |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | return $this->getRelationValue('permissions'); |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | - $permissions = Cache::remember($this->getPermissionsCacheKey(), now()->addHour(), function () { |
|
| 158 | + $permissions = Cache::remember($this->getPermissionsCacheKey(), now()->addHour(), function() { |
|
| 159 | 159 | return $this->getRelationValue('permissions'); |
| 160 | 160 | }); |
| 161 | 161 | |
@@ -169,6 +169,6 @@ discard block |
||
| 169 | 169 | $this->clearRolesCache(); |
| 170 | 170 | $this->clearPermissionsCache(); |
| 171 | 171 | $this->clearHasPermissionsCaches(); |
| 172 | - Cache::forget($this->getGeneralCacheKey() . '.user'); |
|
| 172 | + Cache::forget($this->getGeneralCacheKey().'.user'); |
|
| 173 | 173 | } |
| 174 | 174 | } |