class LoginAttemptRepository extends EntityRepository (View source)

Methods

before(DateTime $before, User|int $user = null, bool $count = false)

Get a list of login attempts prior to a date

after(DateTime $after, User|int $user = null, bool $count = false)

Get a list of login attempts after a given date

Carbon
validateTimezone(DateTime $dateTime)

No description

int|null
validateUser(mixed $user, bool $requireValue = false)

Validate a passed user value and resolve the ID

Details

Iterator|LoginAttempt[]|int before(DateTime $before, User|int $user = null, bool $count = false)

Get a list of login attempts prior to a date

Parameters

DateTime $before Must be in UTC
User|int $user
bool $count Whether we return an integer count, or an iterator of matches

Return Value

Iterator|LoginAttempt[]|int

Iterator|LoginAttempt[]|int after(DateTime $after, User|int $user = null, bool $count = false)

Get a list of login attempts after a given date

Parameters

DateTime $after Must be in UTC
User|int $user
bool $count Whether we return an integer count, or an iterator of matches

Return Value

Iterator|LoginAttempt[]|int

private Carbon validateTimezone(DateTime $dateTime)

Parameters

DateTime $dateTime

Return Value

Carbon

Exceptions

InvalidArgumentException

private int|null validateUser(mixed $user, bool $requireValue = false)

Validate a passed user value and resolve the ID

Parameters

mixed $user
bool $requireValue Whether a user value is required

Return Value

int|null

Exceptions

InvalidArgumentException