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