Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"minimum-stability": "dev",
"require": {
"php": "^8.0",
"illuminate/notifications": "~5.6 || ~6.0 || ~7.0 || ~8.0 || ~9.0"
"illuminate/notifications": ">=5.6 <11.0 || ^11.0"
},
"config": {
"sort-packages": true
Expand Down
4 changes: 2 additions & 2 deletions src/NotificationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function boot() {
parent::boot();

$callback = function ($notificationType) {
cache()->forget("notifications:$notificationType->name");
cache()->tags('notification_settings')->forget("notifications:$notificationType->name");
};

static::saved($callback);
Expand All @@ -77,7 +77,7 @@ public function notifications()
*/
public static function isEnabled($notificationType)
{
$settings = cache()->rememberForever("notifications:$notificationType", function () use ($notificationType) {
$settings = cache()->tags('notification_settings')->rememberForever("notifications:$notificationType", function () use ($notificationType) {
return NotificationType::whereName($notificationType)->first();
});

Expand Down
2 changes: 1 addition & 1 deletion src/Schedulable.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function viaQueues()
}

$notificationType = get_class($this);
$settings = cache()->rememberForever("notifications:$notificationType", function () use ($notificationType) {
$settings = cache()->tags('notification_settings')->rememberForever("notifications:$notificationType", function () use ($notificationType) {
return NotificationType::whereName($notificationType)->first();
});

Expand Down