From 9986dfa956070e3c9e3bdf092c7836ef9cbc137f Mon Sep 17 00:00:00 2001 From: Giovanni-Josserand Date: Mon, 9 Mar 2026 16:53:38 +0100 Subject: [PATCH] add user_id attribut on Notifications table --- app/Models/Notification.php | 1 + .../migrations/2025_11_07_103448_create_notifications_table.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/Models/Notification.php b/app/Models/Notification.php index 24237b3..afbd645 100644 --- a/app/Models/Notification.php +++ b/app/Models/Notification.php @@ -8,6 +8,7 @@ class Notification extends Model { protected $fillable = [ 'content', + 'user_id', ]; public function users(): \Illuminate\Database\Eloquent\Relations\BelongsToMany diff --git a/database/migrations/2025_11_07_103448_create_notifications_table.php b/database/migrations/2025_11_07_103448_create_notifications_table.php index a574923..7c51134 100644 --- a/database/migrations/2025_11_07_103448_create_notifications_table.php +++ b/database/migrations/2025_11_07_103448_create_notifications_table.php @@ -15,6 +15,7 @@ return new class extends Migration $table->id(); $table->timestamps(); $table->string('content'); + $table->integer('user_id')->default(null); }); }