@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | public function latestForUser($userId) |
| 22 | 22 | { |
| 23 | 23 | return $this->cache |
| 24 | - ->tags([$this->entityName, 'global']) |
|
| 24 | + ->tags([ $this->entityName, 'global' ]) |
|
| 25 | 25 | ->remember( |
| 26 | 26 | "{$this->locale}.{$this->entityName}.latestForUser.{$userId}", |
| 27 | 27 | $this->cacheTime, |
| 28 | - function () use ($userId) { |
|
| 28 | + function() use ($userId) { |
|
| 29 | 29 | return $this->repository->latestForUser($userId); |
| 30 | 30 | } |
| 31 | 31 | ); |
@@ -51,11 +51,11 @@ discard block |
||
| 51 | 51 | public function allForUser($userId) |
| 52 | 52 | { |
| 53 | 53 | return $this->cache |
| 54 | - ->tags([$this->entityName, 'global']) |
|
| 54 | + ->tags([ $this->entityName, 'global' ]) |
|
| 55 | 55 | ->remember( |
| 56 | 56 | "{$this->locale}.{$this->entityName}.allForUser.{$userId}", |
| 57 | 57 | $this->cacheTime, |
| 58 | - function () use ($userId) { |
|
| 58 | + function() use ($userId) { |
|
| 59 | 59 | return $this->repository->allForUser($userId); |
| 60 | 60 | } |
| 61 | 61 | ); |
@@ -69,11 +69,11 @@ discard block |
||
| 69 | 69 | public function allReadForUser($userId) |
| 70 | 70 | { |
| 71 | 71 | return $this->cache |
| 72 | - ->tags([$this->entityName, 'global']) |
|
| 72 | + ->tags([ $this->entityName, 'global' ]) |
|
| 73 | 73 | ->remember( |
| 74 | 74 | "{$this->locale}.{$this->entityName}.allReadForUser.{$userId}", |
| 75 | 75 | $this->cacheTime, |
| 76 | - function () use ($userId) { |
|
| 76 | + function() use ($userId) { |
|
| 77 | 77 | return $this->repository->allReadForUser($userId); |
| 78 | 78 | } |
| 79 | 79 | ); |
@@ -87,11 +87,11 @@ discard block |
||
| 87 | 87 | public function allUnreadForUser($userId) |
| 88 | 88 | { |
| 89 | 89 | return $this->cache |
| 90 | - ->tags([$this->entityName, 'global']) |
|
| 90 | + ->tags([ $this->entityName, 'global' ]) |
|
| 91 | 91 | ->remember( |
| 92 | 92 | "{$this->locale}.{$this->entityName}.allUnreadForUser.{$userId}", |
| 93 | 93 | $this->cacheTime, |
| 94 | - function () use ($userId) { |
|
| 94 | + function() use ($userId) { |
|
| 95 | 95 | return $this->repository->allUnreadForUser($userId); |
| 96 | 96 | } |
| 97 | 97 | ); |
@@ -18,9 +18,9 @@ |
||
| 18 | 18 | class Notification extends Model |
| 19 | 19 | { |
| 20 | 20 | protected $table = 'notification__notifications'; |
| 21 | - protected $fillable = ['user_id', 'type', 'message', 'icon_class', 'link', 'is_read', 'title']; |
|
| 22 | - protected $appends = ['time_ago']; |
|
| 23 | - protected $casts = ['is_read' => 'bool']; |
|
| 21 | + protected $fillable = [ 'user_id', 'type', 'message', 'icon_class', 'link', 'is_read', 'title' ]; |
|
| 22 | + protected $appends = [ 'time_ago' ]; |
|
| 23 | + protected $casts = [ 'is_read' => 'bool' ]; |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |