feat: account verified at
This commit is contained in:
@@ -23,6 +23,7 @@ class UserResource extends JsonResource
|
||||
'height' => $this->height,
|
||||
'avatarUrl' => $this->avatar_url ? asset(Storage::url($this->avatar_url)) : null,
|
||||
'bio' => $this->bio,
|
||||
'accountVerified' => $this->account_verified_at !== null,
|
||||
'physicalActivityLevel' => $this->physical_activity_level,
|
||||
'weightGoal' => $this->weight_goal,
|
||||
'pacePreference' => $this->pace_preference,
|
||||
|
||||
@@ -65,6 +65,7 @@ class User extends Authenticatable implements FilamentUser, MustVerifyEmail
|
||||
{
|
||||
return [
|
||||
'email_verified_at' => 'datetime',
|
||||
'account_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
'daily_calorie_goal' => 'integer',
|
||||
'daily_protein_goal' => 'float',
|
||||
|
||||
@@ -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->timestampTz('account_verified_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user