$attachments * @property-read int|null $attachments_count * @property-read \Illuminate\Database\Eloquent\Collection $author_of_blog_post * @property-read int|null $author_of_blog_post_count * @property-read \Illuminate\Database\Eloquent\Collection $author_of_diets * @property-read int|null $author_of_diets_count * @property-read \Illuminate\Database\Eloquent\Collection $author_of_plans * @property-read int|null $author_of_plans_count * @property-read \Illuminate\Database\Eloquent\Collection $author_of_recipe * @property-read int|null $author_of_recipe_count * @property-read \Illuminate\Database\Eloquent\Collection $blog_post_comment_upvotes * @property-read int|null $blog_post_comment_upvotes_count * @property-read \Illuminate\Database\Eloquent\Collection $blog_post_comments * @property-read int|null $blog_post_comments_count * @property-read \Illuminate\Database\Eloquent\Collection $blog_post_likes * @property-read int|null $blog_post_likes_count * @property-read \App\Models\ChosenDiet|null $chosen_diet * @property-read \App\Models\ChosenPlan|null $chosen_plan * @property-read \Illuminate\Database\Eloquent\Collection $circumference_measures * @property-read int|null $circumference_measures_count * @property-read \Illuminate\Database\Eloquent\Collection $comment_upvotes * @property-read int|null $comment_upvotes_count * @property-read \App\Models\ConsultantLegalEntity|null $consultant_legal_entity * @property-read \App\Models\ConsultantEducation|null $consultant_request * @property-read \App\Models\UserDetailz|null $detailz * @property-read \Illuminate\Database\Eloquent\Collection $diaries * @property-read int|null $diaries_count * @property-read \Illuminate\Database\Eloquent\Collection $diet_comment_upvotes * @property-read int|null $diet_comment_upvotes_count * @property-read \Illuminate\Database\Eloquent\Collection $diet_comments * @property-read int|null $diet_comments_count * @property-read \Illuminate\Database\Eloquent\Collection $diet_likes * @property-read int|null $diet_likes_count * @property-read \Illuminate\Database\Eloquent\Collection $meals * @property-read int|null $meals_count * @property-read \Illuminate\Notifications\DatabaseNotificationCollection $notifications * @property-read int|null $notifications_count * @property-read \Illuminate\Database\Eloquent\Collection $plan_comments * @property-read int|null $plan_comments_count * @property-read \Illuminate\Database\Eloquent\Collection $plan_likes * @property-read int|null $plan_likes_count * @property-read string $profile_photo_url * @property-read \Illuminate\Database\Eloquent\Collection $recipe_comment_upvotes * @property-read int|null $recipe_comment_upvotes_count * @property-read \Illuminate\Database\Eloquent\Collection $recipe_comments * @property-read int|null $recipe_comments_count * @property-read \Illuminate\Database\Eloquent\Collection $recipe_likes * @property-read int|null $recipe_likes_count * @property-read \Illuminate\Database\Eloquent\Collection $tokens * @property-read int|null $tokens_count * @property-read \Illuminate\Database\Eloquent\Collection $views * @property-read int|null $views_count * @property-read \Illuminate\Database\Eloquent\Collection $weight_measures * @property-read int|null $weight_measures_count * @method static \Database\Factories\UserFactory factory($count = null, $state = []) * @method static \Illuminate\Database\Eloquent\Builder|User newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|User newQuery() * @method static \Illuminate\Database\Eloquent\Builder|User orderByUniqueViews(string $direction = 'desc', $period = null, ?string $collection = null, string $as = 'unique_views_count') * @method static \Illuminate\Database\Eloquent\Builder|User orderByViews(string $direction = 'desc', ?\CyrildeWit\EloquentViewable\Support\Period $period = null, ?string $collection = null, bool $unique = false, string $as = 'views_count') * @method static \Illuminate\Database\Eloquent\Builder|User query() * @method static \Illuminate\Database\Eloquent\Builder|User whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|User whereCurrentTeamId($value) * @method static \Illuminate\Database\Eloquent\Builder|User whereEmail($value) * @method static \Illuminate\Database\Eloquent\Builder|User whereEmailVerifiedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|User whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|User whereIsConsultant($value) * @method static \Illuminate\Database\Eloquent\Builder|User whereIsPublicProfile($value) * @method static \Illuminate\Database\Eloquent\Builder|User whereName($value) * @method static \Illuminate\Database\Eloquent\Builder|User wherePassword($value) * @method static \Illuminate\Database\Eloquent\Builder|User whereProfilePhotoPath($value) * @method static \Illuminate\Database\Eloquent\Builder|User whereRememberToken($value) * @method static \Illuminate\Database\Eloquent\Builder|User whereTwoFactorConfirmedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|User whereTwoFactorRecoveryCodes($value) * @method static \Illuminate\Database\Eloquent\Builder|User whereTwoFactorSecret($value) * @method static \Illuminate\Database\Eloquent\Builder|User whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|User withViewsCount(?\CyrildeWit\EloquentViewable\Support\Period $period = null, ?string $collection = null, bool $unique = false, string $as = 'views_count') * @mixin \Eloquent */ class User extends Authenticatable implements MustVerifyEmail, Viewable { use HasApiTokens; use HasFactory; use HasProfilePhoto; use InteractsWithViews; use Notifiable; use TwoFactorAuthenticatable; use UserMustVerifyEmail; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'name', 'email', 'password', 'is_public_profile', ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ 'password', 'remember_token', 'two_factor_recovery_codes', 'two_factor_secret', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'email_verified_at' => 'datetime', ]; /** * The accessors to append to the model's array form. * * @var array */ protected $appends = [ 'profile_photo_url', ]; /* public function author_of_blog_post() { return $this->belongsToMany(BlogPost::class, 'blog_post_author'); } public function author_of_plans() { return $this->belongsToMany(Plan::class, 'plan_author'); } public function author_of_diets() { return $this->belongsToMany(Diet::class, 'diet_author'); } public function author_of_recipe() { return $this->belongsToMany(Recipe::class, 'recipe_author'); } */ public function diaries(): HasMany { return $this->hasMany(Diary::class); } public function meals(): HasMany { return $this->hasMany(Meal::class); } public function detailz(): HasOne { return $this->hasOne(UserDetailz::class); } public function circumference_measures(): HasMany { return $this->hasMany(CircumferenceMeasure::class); } public function weight_measures(): HasMany { return $this->hasMany(WeightMeasure::class); } public function consultant_request(): HasOne { return $this->hasOne(ConsultantEducation::class); } public function attachments(): HasMany { return $this->hasMany(UserAttachment::class); } public function author_of_plans(): BelongsToMany { return $this->belongsToMany(Plan::class, 'plan_author', 'user_id', 'plan_id'); } public function author_of_diets(): BelongsToMany { return $this->belongsToMany(Diet::class, 'diet_author', 'user_id', 'diet_id'); } public function author_of_blog_post(): BelongsToMany { return $this->belongsToMany(BlogPost::class, 'blog_post_author', 'user_id', 'blog_post_id'); } public function author_of_recipe(): BelongsToMany { return $this->belongsToMany(Recipe::class, 'recipe_author', 'user_id', 'recipe_id'); } public function plan_comments(): HasMany { return $this->hasMany(PlanComment::class); } public function plan_likes(): HasMany { return $this->hasMany(PlanLike::class); } public function diet_comments(): HasMany { return $this->hasMany(DietComment::class); } public function diet_likes(): HasMany { return $this->hasMany(DietLike::class); } public function comment_upvotes(): HasMany { return $this->hasMany(CommentUpvote::class); } public function diet_comment_upvotes(): HasMany { return $this->hasMany(DietCommentUpvote::class); } public function chosen_plan(): HasOne { return $this->hasOne(ChosenPlan::class); } public function chosen_diet(): HasOne { return $this->hasOne(ChosenDiet::class); } public function blog_post_comments(): HasMany { return $this->hasMany(BlogPostComment::class); } public function blog_post_likes(): HasMany { return $this->hasMany(BlogPostLike::class); } public function blog_post_comment_upvotes(): HasMany { return $this->hasMany(BlogPostCommentUpvote::class); } public function recipe_comments(): HasMany { return $this->hasMany(RecipeComment::class); } public function recipe_likes(): HasMany { return $this->hasMany(RecipeLike::class); } public function recipe_comment_upvotes(): HasMany { return $this->hasMany(RecipeCommentUpvote::class); } public function consultant_legal_entity(): HasOne { return $this->hasOne(ConsultantLegalEntity::class); } protected function consultantState(): Attribute { return Attribute::make( get: fn () => $this->consultant_request ? $this->consultant_request->request_state : 'incomplete', ); } }