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.

This commit is contained in:
Leonid Nikitin 2023-06-29 00:06:27 +06:00
parent 90cab02d62
commit 9b56522f02
Signed by: kor-elf
GPG Key ID: 7DE8F80C5CEC2C0D
2 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,7 @@ final class User extends Authenticatable
'password', 'password',
'timezone', 'timezone',
'is_active', 'is_active',
'locale',
]; ];
/** /**

View File

@ -19,6 +19,7 @@ return new class extends Migration
$table->timestamp('email_verified_at')->nullable(); $table->timestamp('email_verified_at')->nullable();
$table->string('password'); $table->string('password');
$table->rememberToken(); $table->rememberToken();
$table->string('locale', 2)->default('ru');
$table->string('timezone')->nullable(); $table->string('timezone')->nullable();
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();