resolve conflits

This commit is contained in:
T'JAMPENS QUENTIN p2406187
2025-11-20 09:01:13 +01:00
22 changed files with 277 additions and 152 deletions
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Notification extends Model
{
protected $fillable = [
'content',
];
public function users(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
{
return $this->belongsToMany(User::class, 'user_notification', 'notification_id', 'user_id');
}
}
+5
View File
@@ -54,4 +54,9 @@ 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, 'user_notification', 'user_id', 'notification_id');
}
}