From 75d62872c36ca85be85d089af6d1f27f15aeec60 Mon Sep 17 00:00:00 2001 From: arvanitakis95 Date: Thu, 19 Dec 2024 04:24:08 +0200 Subject: [PATCH] minor changes --- README.md | 6 +++--- src/Config/notifications.php | 8 +++++--- src/Migrations/create_notifications_settings.php | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2c3e9da..03c9da5 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ Every notification is an instance of `LucentNotifications\Models\Notification` m ### Mail notifications The static::create function accepts a Mailable class as its mail parameter. Lucent Notifications will instanciate the new Mailable class with the following parameters: - - Notification $notification, - - array $userFrom and - - array $userTo + # Notification $notification, + # array $userFrom and + # array $userTo so keep that in mind when defining your own Mailable class diff --git a/src/Config/notifications.php b/src/Config/notifications.php index 7412bce..98dbf26 100644 --- a/src/Config/notifications.php +++ b/src/Config/notifications.php @@ -1,11 +1,13 @@ [ - 'quietHours' => ['18:00-10:00'], - 'commented' => 'both', + 'notificationsSettings' => [ + 'commented' => 'broadcast', 'assigned' => 'none', 'mentioned' => 'none', + ], + 'userPreferences' => [ + 'quietHours' => ['18:00-10:00'], 'dailyBriefing' => false ] ]; \ No newline at end of file diff --git a/src/Migrations/create_notifications_settings.php b/src/Migrations/create_notifications_settings.php index 4a2f507..a944cc8 100644 --- a/src/Migrations/create_notifications_settings.php +++ b/src/Migrations/create_notifications_settings.php @@ -11,9 +11,10 @@ return new class extends Migration */ public function up(): void { - Schema::create('notificationsSettings', function (Blueprint $table) { + Schema::create('userSettings', function (Blueprint $table) { $table->uuid('userId')->primary(); - $table->text('data'); + $table->text('notificationsSettings'); + $table->text('userPreferences'); }); } @@ -22,6 +23,6 @@ return new class extends Migration */ public function down(): void { - Schema::dropIfExists('notificationsSettings'); + Schema::dropIfExists('userSettings'); } };