class Auth (View source)

Properties

protected array $credentials

Methods

__construct(array $provider, array $credentials = [])

Auth constructor.

static Auth
configure(array $config)

Configure Auth system

static Auth
getInstance()

Get Auth instance

Auth|null
guard(null|string $guard = null)

Check if user is authenticate

bool
check()

Check if user is authenticate

bool
guest()

Check if user is guest

bool
user()

Check if user is authenticate

bool
attempts(array $credentials)

Check if user is authenticate

bool
login(Authentication $user)

Make direct login

bool
id()

Get the user id

static mixed
__callStatic(string $method, array $parameters)

__call

Details

__construct(array $provider, array $credentials = [])

Auth constructor.

Parameters

array $provider
array $credentials

static Auth configure(array $config)

Configure Auth system

Parameters

array $config

Return Value

Auth

static Auth getInstance()

Get Auth instance

Return Value

Auth

Auth|null guard(null|string $guard = null)

Check if user is authenticate

Parameters

null|string $guard

Return Value

Auth|null

Exceptions

AuthenticateException

bool check()

Check if user is authenticate

Return Value

bool

bool guest()

Check if user is guest

Return Value

bool

bool user()

Check if user is authenticate

Return Value

bool

bool attempts(array $credentials)

Check if user is authenticate

Parameters

array $credentials

Return Value

bool

bool login(Authentication $user)

Make direct login

Parameters

Authentication $user

Return Value

bool

bool id()

Get the user id

Return Value

bool

static mixed __callStatic(string $method, array $parameters)

__call

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException