feat: add status in v2

This commit is contained in:
2026-06-10 12:02:23 +03:30
parent 2fd5b262a6
commit c0ff35c0a8
2 changed files with 28 additions and 0 deletions
+2
View File
@@ -92,6 +92,7 @@ public function loginV2(Request $request)
'identifier' => $user->identifier, 'identifier' => $user->identifier,
'token' => $access_token, 'token' => $access_token,
'user' => $user, 'user' => $user,
'status' => $response,
]; ];
} }
@@ -500,6 +501,7 @@ public function updateProfile(Request $request)
'first_name' => 'string|nullable', 'first_name' => 'string|nullable',
'last_name' => 'string|nullable', 'last_name' => 'string|nullable',
'birthday' => 'date|nullable', 'birthday' => 'date|nullable',
'age' => 'integer|nullable|min:0|max:120',
'gender' => ['integer', 'nullable', Rule::in(User::GENDERS)], 'gender' => ['integer', 'nullable', Rule::in(User::GENDERS)],
'email' => 'email|nullable', 'email' => 'email|nullable',
'mobile' => [new MobileNumber, 'string'], 'mobile' => [new MobileNumber, 'string'],
@@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
if (!Schema::hasColumn('users', 'age')) {
$table->unsignedTinyInteger('age')->nullable()->after('birthday');
}
});
}
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
if (Schema::hasColumn('users', 'age')) {
$table->dropColumn('age');
}
});
}
};