class User extends Model implements Authenticatable, Authorizable, MustVerifyEmail, CanResetPassword, HasLocalePreference (View source)

Traits

Authenticatable
Authorizable
CanResetPassword

Methods to associate uploaded images with a model.

MustVerifyEmail
Notifiable

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
protected $hidden
protected $casts
protected $originalUser
int $id
string $name
string $email
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

getConnectionName()

No description

from  Model
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 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.

markNotificationsRead(Model $model)

Mark the user's notifications about a specific subject as read.

string|null
preferredLocale()

Get the user's preferred locale.

uploadAvatar(Image $image)

Upload a new avatar.

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

Attribute
url()

No description

Attribute
editUrl()

No description

Attribute
avatarUrl()

No description

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.

Details

getConnectionName()

No description

static void bootReceivesPermissions()

No description

Return Value

void

MorphMany permissions()

Relationship with the permission records granted to this model.

Return Value

MorphMany

void savePermissions(array|null $grid)

Save the permissions to the database.

Parameters

array|null $grid

Return Value

void

HtmlString|string format(string $attribute, User $user = null)

Render an attribute as HTML for the given user.

Parameters

string $attribute
User $user

Return Value

HtmlString|string

static Formatter getFormatter(string $attribute)

Set a formatter instance for this model.

Parameters

string $attribute

Return Value

Formatter

static void setFormatter(string $attribute, Formatter $formatter)

Set a formatter instance for this model.

Parameters

string $attribute
Formatter $formatter

Return Value

void

getAttribute($key)

No description

Parameters

$key

setAttribute($key, $value)

No description

Parameters

$key
$value

static protected void booted()

No description

Return Value

void

HasMany posts()

Relationship with the user's posts.

Return Value

HasMany

HasMany comments()

Relationship with the user's comments.

Return Value

HasMany

BelongsToMany groups()

Relationship with the user's selected groups.

Return Value

BelongsToMany

MorphMany notifications()

Relationship with the user's notifications.

Return Value

MorphMany

HasMany reactions()

Relationship with the user's reactions.

Return Value

HasMany

HasMany authProviders()

Relationship with the user's external authentication providers.

Return Value

HasMany

HasMany uploads()

Relationship with the user's file uploads.

Return Value

HasMany

User markNotificationsRead(Model $model)

Mark the user's notifications about a specific subject as read.

Parameters

Model $model

Return Value

User

string|null preferredLocale()

Get the user's preferred locale.

Return Value

string|null

User uploadAvatar(Image $image)

Upload a new avatar.

Parameters

Image $image

Return Value

User

User removeAvatar()

Remove the user's avatar.

Return Value

User

void sendEmailVerificationNotification()

Send an email verification notification to the user.

Return Value

void

string|null routeNotificationForMail()

Only send notification emails to a verified address.

Return Value

string|null

void sendPasswordResetNotification($token)

Send a password reset notification to the user.

Parameters

$token

Return Value

void

bool isAdmin()

Determine whether this user is an admin.

Return Value

bool

bool isRootAdmin()

Determine whether this user is the root admin.

Return Value

bool

bool isOnline()

Determine whether the user is online (active in the last 5 minutes).

Return Value

bool

bool isSuspended()

No description

Return Value

bool

protected Attribute url()

No description

Return Value

Attribute

protected Attribute editUrl()

No description

Return Value

Attribute

protected Attribute avatarUrl()

No description

Return Value

Attribute

protected Attribute unreadNotificationCount()

No description

Return Value

Attribute

string broadcastChannelRoute()

No description

Return Value

string

string broadcastChannel()

No description

Return Value

string

AuthenticatesWaterhole|null originalUser()

Get the original user that was used to authenticate this Waterhole request.

Return Value

AuthenticatesWaterhole|null

User setOriginalUser(AuthenticatesWaterhole $user)

No description

Parameters

AuthenticatesWaterhole $user

Return Value

User