Added native os notifications
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\UserFlight;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
|
||||
@@ -11,10 +12,11 @@ class FlightObserver
|
||||
{
|
||||
Cache::forget("user_flights_{$flight->user->id}");
|
||||
|
||||
//Make queued task if the site gets big
|
||||
$flight->user->followers()
|
||||
$flight
|
||||
->user
|
||||
->followers()
|
||||
->get()
|
||||
->each(fn ($follower) => Cache::forget("user_following_flights_{$follower->user_id}"));
|
||||
->each(fn ($follower) => Cache::forget("user_following_flights_{$follower->id}"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user