$notifications * @property-read int|null $notifications_count * @property-read \Illuminate\Database\Eloquent\Collection $roles * @property-read int|null $roles_count * @property-read \Illuminate\Database\Eloquent\Collection $tokens * @property-read int|null $tokens_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 query() * @method static \Illuminate\Database\Eloquent\Builder|User whereCreatedAt($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 whereName($value) * @method static \Illuminate\Database\Eloquent\Builder|User wherePassword($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) * @mixin \Eloquent */ class User extends Authenticatable implements MustVerifyEmail { /** @use HasFactory<\Database\Factories\UserFactory> */ use HasApiTokens, HasFactory, Notifiable; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'name', 'email', 'password', ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ 'password', 'remember_token', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; } public function roles(): BelongsToMany { return $this->belongsToMany(Role::class); } }