feat: account verified at
Laravel CI-CD / Tests Unitaires (push) Successful in 25s Details
Laravel CI-CD / Deploy with Kamal (push) Successful in 1m43s Details

This commit is contained in:
Leon Morival 2026-05-21 14:38:22 +02:00
parent d866bab8f5
commit 646f5a1ea8
3 changed files with 30 additions and 0 deletions

View File

@ -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,

View File

@ -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',

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->timestampTz('account_verified_at')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
//
});
}
};