From 9b56522f02a4f55a3cd44d9010e46a6dc8a471ab Mon Sep 17 00:00:00 2001 From: Leonid Nikitin Date: Thu, 29 Jun 2023 00:06:27 +0600 Subject: [PATCH] A new 'locale' field of string type with a maximum length of 2 characters and a default value as 'ru' has been added to the users table through a migration file. This field has been also added to the User model. The addition of the 'locale' field will allow users to specify their preferred language in their profile settings. --- app/Models/User.php | 1 + database/migrations/2014_10_12_000000_create_users_table.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/Models/User.php b/app/Models/User.php index 8d6ac1d..af1babe 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -24,6 +24,7 @@ final class User extends Authenticatable 'password', 'timezone', 'is_active', + 'locale', ]; /** diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 8b37449..28d52cf 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -19,6 +19,7 @@ return new class extends Migration $table->timestamp('email_verified_at')->nullable(); $table->string('password'); $table->rememberToken(); + $table->string('locale', 2)->default('ru'); $table->string('timezone')->nullable(); $table->timestamps(); $table->softDeletes();