feat: create default user settings for migrated users if none exist
This commit is contained in:
parent
22572bc6a3
commit
eaa8908663
@ -3,6 +3,7 @@
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Enums\IsActive;
|
||||
use App\Enums\NotifStyle;
|
||||
use App\Enums\RoleEnum;
|
||||
use App\Models\User;
|
||||
use Illuminate\Console\Command;
|
||||
@ -68,6 +69,17 @@ public function handle()
|
||||
$user->syncRoles([$roleName]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($user && ! $user->settings()->exists()) {
|
||||
$user->settings()->create([
|
||||
'notif_style' => NotifStyle::CHEERFUL,
|
||||
'primary_color' => 'blue',
|
||||
'font' => 'Inter',
|
||||
'content_width' => 'full',
|
||||
'border_radius' => 'lg',
|
||||
'top_navigation' => false,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->newLine();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user