Added PushSubscription method in the user model
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Successful in 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Laravel Pint / pint (pull_request) Failing after 7m31s
Laravel Larastan / larastan (pull_request) Failing after 8m57s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Successful in 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Laravel Pint / pint (pull_request) Failing after 7m31s
Laravel Larastan / larastan (pull_request) Failing after 8m57s
This commit is contained in:
@@ -14,6 +14,7 @@ use Illuminate\Notifications\Notifiable;
|
|||||||
use Spatie\Permission\Traits\HasRoles;
|
use Spatie\Permission\Traits\HasRoles;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
use NotificationChannels\WebPush\HasPushSubscriptions;
|
use NotificationChannels\WebPush\HasPushSubscriptions;
|
||||||
|
use NotificationChannels\WebPush\PushSubscription;
|
||||||
|
|
||||||
class User extends Authenticatable implements FilamentUser
|
class User extends Authenticatable implements FilamentUser
|
||||||
{
|
{
|
||||||
@@ -64,4 +65,9 @@ class User extends Authenticatable implements FilamentUser
|
|||||||
{
|
{
|
||||||
return $this->belongsTo(Plant::class);
|
return $this->belongsTo(Plant::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function pushSubscriptions()
|
||||||
|
{
|
||||||
|
return $this->morphMany(PushSubscription::class, 'subscribable');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user