translate base

This commit is contained in:
Mekan1206
2026-07-31 18:08:08 +05:00
parent a794dacd39
commit 581cb8241c
413 changed files with 9087 additions and 428 deletions

View File

@@ -34,6 +34,7 @@ class UserFactory extends Factory
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
'department_id' => Department::factory(),
'locale' => 'en',
];
}

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->string('locale', 5)->default('en')->after('email');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('locale');
});
}
};

View File

@@ -15,7 +15,7 @@ class AdminUserSeeder extends Seeder
public function run(): void
{
$admin = User::query()->updateOrCreate(
['email' => 'admin@company.com'],
['email' => 'admin@example.com'],
[
'name' => 'Admin',
'password' => Hash::make('password'),