feat: account verified at
This commit is contained in:
parent
d866bab8f5
commit
646f5a1ea8
|
|
@ -23,6 +23,7 @@ class UserResource extends JsonResource
|
||||||
'height' => $this->height,
|
'height' => $this->height,
|
||||||
'avatarUrl' => $this->avatar_url ? asset(Storage::url($this->avatar_url)) : null,
|
'avatarUrl' => $this->avatar_url ? asset(Storage::url($this->avatar_url)) : null,
|
||||||
'bio' => $this->bio,
|
'bio' => $this->bio,
|
||||||
|
'accountVerified' => $this->account_verified_at !== null,
|
||||||
'physicalActivityLevel' => $this->physical_activity_level,
|
'physicalActivityLevel' => $this->physical_activity_level,
|
||||||
'weightGoal' => $this->weight_goal,
|
'weightGoal' => $this->weight_goal,
|
||||||
'pacePreference' => $this->pace_preference,
|
'pacePreference' => $this->pace_preference,
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ class User extends Authenticatable implements FilamentUser, MustVerifyEmail
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'email_verified_at' => 'datetime',
|
'email_verified_at' => 'datetime',
|
||||||
|
'account_verified_at' => 'datetime',
|
||||||
'password' => 'hashed',
|
'password' => 'hashed',
|
||||||
'daily_calorie_goal' => 'integer',
|
'daily_calorie_goal' => 'integer',
|
||||||
'daily_protein_goal' => 'float',
|
'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) {
|
||||||
|
//
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue