feat: add status in v2
This commit is contained in:
@@ -92,6 +92,7 @@ public function loginV2(Request $request)
|
||||
'identifier' => $user->identifier,
|
||||
'token' => $access_token,
|
||||
'user' => $user,
|
||||
'status' => $response,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -500,6 +501,7 @@ public function updateProfile(Request $request)
|
||||
'first_name' => 'string|nullable',
|
||||
'last_name' => 'string|nullable',
|
||||
'birthday' => 'date|nullable',
|
||||
'age' => 'integer|nullable|min:0|max:120',
|
||||
'gender' => ['integer', 'nullable', Rule::in(User::GENDERS)],
|
||||
'email' => 'email|nullable',
|
||||
'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');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user