use native Notification table and migration
This commit is contained in:
@@ -57,16 +57,4 @@ class User extends Authenticatable
|
||||
public function tasks() {
|
||||
return $this->belongsToMany(Task::class);
|
||||
}
|
||||
|
||||
public function notifications(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(
|
||||
Notification::class,
|
||||
'notification_user',
|
||||
'user_id',
|
||||
'notification_id',
|
||||
)
|
||||
->withPivot('unread')
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user