User
class User extends Model implements Authenticatable, Authorizable, MustVerifyEmail, CanResetPassword, HasLocalePreference (View source)
Traits
Methods to associate uploaded images with a model.
Methods to manage permissions that are granted to a model.
Constants
UPDATED_AT |
|
Properties
static protected | $unguarded | from Model | |
PermissionCollection read-only | $permissions | from ReceivesPermissions | |
static protected Formatter[] | $formatters | from UsesFormatter | |
$hidden | |||
protected | $casts | ||
protected | $originalUser | ||
int | $id | ||
string | $name | ||
string | |||
null|Carbon | $email_verified_at | ||
null|string | $password | ||
null|string | $remember_token | ||
null|string | $locale | ||
null|string | $headline | ||
null|string | $bio | ||
null|string | $location | ||
null|string | $website | ||
null|string | $avatar | ||
null|Carbon | $created_at | ||
null|Carbon | $last_seen_at | ||
null|Carbon | $suspended_until | ||
bool | $show_online | ||
null|ArrayObject | $notification_channels | ||
null|Carbon | $notifications_read_at | ||
bool | $follow_on_comment | ||
string read-only | $url | ||
string read-only | $edit_url | ||
string read-only | $avatar_url | ||
int read-only | $unread_notification_count | ||
Collection read-only | $posts | ||
Collection read-only | $comments | ||
Collection read-only | $groups | ||
Collection read-only | $notifications |
Methods
Relationship with the permission records granted to this model.
Save the permissions to the database.
Set a formatter instance for this model.
No description
Relationship with the user's posts.
Relationship with the user's comments.
Relationship with the user's selected groups.
Relationship with the user's notifications.
Relationship with the user's reactions.
Relationship with the user's external authentication providers.
Relationship with the user's file uploads.
Get the user's preferred locale.
Upload a new avatar.
Remove the user's avatar.
Send an email verification notification to the user.
Only send notification emails to a verified address.
Send a password reset notification to the user.
Determine whether this user is an admin.
Determine whether this user is the root admin.
Determine whether the user is online (active in the last 5 minutes).
No description
No description
No description
No description
No description
No description
No description
Get the original user that was used to authenticate this Waterhole request.
Details
in
Model at line 18
getConnectionName()
No description
static void
bootReceivesPermissions()
No description
MorphMany
permissions()
Relationship with the permission records granted to this model.
void
savePermissions(array|null $grid)
Save the permissions to the database.
HtmlString|string
format(string $attribute, User $user = null)
Render an attribute as HTML for the given user.
static Formatter
getFormatter(string $attribute)
Set a formatter instance for this model.
static void
setFormatter(string $attribute, Formatter $formatter)
Set a formatter instance for this model.
getAttribute($key)
No description
setAttribute($key, $value)
No description
static protected void
booted()
No description
HasMany
posts()
Relationship with the user's posts.
HasMany
comments()
Relationship with the user's comments.
BelongsToMany
groups()
Relationship with the user's selected groups.
MorphMany
notifications()
Relationship with the user's notifications.
HasMany
reactions()
Relationship with the user's reactions.
HasMany
authProviders()
Relationship with the user's external authentication providers.
HasMany
uploads()
Relationship with the user's file uploads.
User
markNotificationsRead(Model $model)
Mark the user's notifications about a specific subject as read.
string|null
preferredLocale()
Get the user's preferred locale.
User
uploadAvatar(Image $image)
Upload a new avatar.
User
removeAvatar()
Remove the user's avatar.
void
sendEmailVerificationNotification()
Send an email verification notification to the user.
string|null
routeNotificationForMail()
Only send notification emails to a verified address.
void
sendPasswordResetNotification($token)
Send a password reset notification to the user.
bool
isAdmin()
Determine whether this user is an admin.
bool
isRootAdmin()
Determine whether this user is the root admin.
bool
isOnline()
Determine whether the user is online (active in the last 5 minutes).
bool
isSuspended()
No description
protected Attribute
url()
No description
protected Attribute
editUrl()
No description
protected Attribute
avatarUrl()
No description
protected Attribute
unreadNotificationCount()
No description
string
broadcastChannelRoute()
No description
string
broadcastChannel()
No description
AuthenticatesWaterhole|null
originalUser()
Get the original user that was used to authenticate this Waterhole request.
User
setOriginalUser(AuthenticatesWaterhole $user)
No description