Update User model, add notify_enabled

This commit is contained in:
Daniel Supernault 2024-09-30 00:57:36 -06:00
parent df5a9f2659
commit 141fc77be9
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1
2 changed files with 29 additions and 1 deletions

View File

@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Passport\HasApiTokens;
use NotificationChannels\Expo\ExpoPushToken;
use NotificationChannels\WebPush\HasPushSubscriptions;
class User extends Authenticatable
@ -46,6 +45,7 @@ class User extends Authenticatable
'last_active_at',
'register_source',
'expo_token',
'notify_enabled',
'notify_like',
'notify_follow',
'notify_mention',

View File

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->boolean('notify_enabled')->default(false);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('notify_enabled');
});
}
};