feat: add height to users
This commit is contained in:
@@ -16,6 +16,7 @@ class UpdateUserRequest extends FormRequest
|
||||
return [
|
||||
'name' => ['sometimes', 'string', 'max:255'],
|
||||
'bio' => ['sometimes', 'nullable', 'string'],
|
||||
'height' => ['sometimes', 'nullable', 'integer'],
|
||||
'avatar' => ['sometimes', 'nullable', 'image', 'max:2048'],
|
||||
'nutritionGoals' => ['sometimes', 'array'],
|
||||
'nutritionGoals.calories' => ['required_with:nutritionGoals', 'integer', 'min:0', 'max:100000'],
|
||||
|
||||
@@ -18,6 +18,7 @@ class UserResource extends JsonResource
|
||||
return [
|
||||
'name' => $this->name,
|
||||
'email' => $this->email,
|
||||
'height' => $this->height,
|
||||
'avatarUrl' => $this->avatar_url ? asset(Storage::url($this->avatar_url)) : null,
|
||||
'bio' => $this->bio,
|
||||
'nutritionGoals' => [
|
||||
|
||||
@@ -27,6 +27,7 @@ class User extends Authenticatable implements FilamentUser
|
||||
'email',
|
||||
'password',
|
||||
'avatar_url',
|
||||
'height',
|
||||
'bio',
|
||||
'daily_calorie_goal',
|
||||
'daily_protein_goal',
|
||||
|
||||
Reference in New Issue
Block a user