class Authentication extends Model (View source)

Traits

Properties

static protected Builder $builder

The query builder instance

from  Model
protected array $hidden

The hidden field

from  Model
protected bool $timestamps

Enable the timestamps support

from  Model
protected string $prefix

Define the table prefix

from  Model
protected bool $auto_increment

Enable the autoincrement support

from  Model
protected string $latest

Defines the column where the query construct will use for the last query

from  Model
protected string $created_at

Defines the created_at column name

from  Model
protected string $updated_at

Defines the created_at column name

from  Model
protected array $attributes

The table columns listing

from  Model
protected array $dates

The date mutation

from  Model
protected array $casts

The casts mutation

from  Model
protected string $primary_key

The table primary key column name

from  Model
protected string $primary_key_type

The table primary key type

from  Model
protected string $table

The table name

from  Model
protected ?string $connection

The connection name

from  Model

Methods

belongsTo(string $related, string|null $foreign_key = null, string|null $primary_key = null)

The has one relative

belongsToMany(string $related, string|null $primary_key = null, string|null $foreign_key = null)

The belongs to many relative

hasMany(string $related, string|null $foreign_key = null, string|null $primary_key = null)

The has many relative

hasOne(string $related, string|null $foreign_key = null, string|null $primary_key = null)

The has one relative

string
getKey()

Get the table key

void
fireEvent(string $event)

Fire event

static string
formatEventName(string $event)

Get event name

void
offsetSet(mixed $offset, mixed $value)

_offsetSet

bool
offsetExists(mixed $offset)

_offsetExists

void
offsetUnset(mixed $offset)

_offsetUnset

mixed
offsetGet(mixed $offset)

_offsetGet

array
__serialize()

Serialize model

void
__unserialize(array $attributes)

Unserialize

__construct(array $attributes = [])

Model constructor.

from  Model
string
getTable()

Get the table name.

from  Model
string|null
getConnection()

No description

from  Model
static Builder
query()

Initialize the connection

from  Model
static Model
connection(string $name)

Set the connection

from  Model
setConnection(string $name)

Set connection point

from  Model
static Collection
all(array $columns = [])

Get all records

from  Model
static Model|null
latest()

Get latest

from  Model
static array|object|null
first()

Get first rows

from  Model
static Collection
retrieveBy(string $column, mixed $value)

retrieve by column name

from  Model
static Collection|Model|null
retrieveAndDelete(int|string|array $id, array $select = ['*'])

retrieve information and delete it

from  Model
static array|object|null
retrieve(int|string|array $id, array $select = ['*'])

retrieve

from  Model
static int
delete()

No description

from  Model
mixed
getKeyValue()

Retrieves the primary key value

from  Model
static array|object
retrieveOrFail(int|string $id, array $select = ['*'])

retrieve information by id or throws an exception in data box not found

from  Model
static Model
create(array $data)

Create a persist information

from  Model
int
persist()

persist aliases on insert action

from  Model
int|bool
update(array $attributes)

Delete a record

from  Model
static Pagination
paginate(int $page_number, int $current = 0, int|null $chunk = null)

Pagination configuration

from  Model
static void
deleted(callable $cb)

Allows to associate listener

from  Model
static void
deleting(callable $cb)

Allows to associate listener

from  Model
static void
creating(callable $cb)

Allows to associate a listener

from  Model
static void
created(callable $cb)

Allows to associate a listener

from  Model
static void
updating(callable $cb)

Allows to associate a listener

from  Model
static void
updated(callable $cb)

Allows to associate a listener

from  Model
static int
deleteBy(string $column, mixed $value)

Delete Active Record by column name

from  Model
static Builder|Collection|Model|mixed
__callStatic(string $name, array $arguments)

__callStatic

from  Model
string
getKeyType()

Retrieves the primary key

from  Model
bool
touch()

Used to update the timestamp.

from  Model
void
setAttribute(string $key, string $value)

Assign a value

from  Model
array
getAttributes()

Retrieves the list of attributes.

from  Model
void
setAttributes(array $attributes)

Assign values to class attributes

from  Model
mixed
getAttribute(string $key)

Allows you to recover an attribute

from  Model
void
setRelation(string $name, mixed $value)

Set a loaded relationship on the model's in-memory store.

from  Model
array
toArray()

Returns the data

from  Model
array
jsonSerialize()

No description

from  Model
mixed
__get(string $name)

__get

from  Model
__set(string $name, mixed $value)

__set

from  Model
string
__toString()

__toString

from  Model
string
toJson()

Returns the data

from  Model
mixed
__call(string $name, array $arguments = [])

__call

from  Model
static Builder
as(string $as)

No description

from  Model
static Builder
select(array $select = '[]')

No description

from  Model
static Builder
distinct(string $column)

WHERE clauses

from  Model
static Builder
where(string $column, mixed $comparator = '\'=\'', mixed $value = 'null')

No description

from  Model
static Builder
whereRaw(string $where, array $data = '[]')

No description

from  Model
static Builder
whereNull(string $column)

No description

from  Model
static Builder
whereNotNull(string $column)

No description

from  Model
static Builder
whereBetween(string $column, array $range)

No description

from  Model
static Builder
whereNotBetween(string $column, array $range)

No description

from  Model
static Builder
whereDifferent(string $column, mixed $value)

No description

from  Model
static Builder
whereIn(string $column, array $range)

No description

from  Model
static Builder
whereNotIn(string $column, array $range)

Joins

from  Model
static Builder
join(string $table, string $first, mixed $comparator = '\'=\'', ?string $second = 'null')

No description

from  Model
static Builder
leftJoin(string $table, string $first, mixed $comparator = '\'=\'', ?string $second = 'null')

No description

from  Model
static Builder
rightJoin(string $table, string $first, mixed $comparator = '\'=\'', ?string $second = 'null')

Grouping, ordering, limiting, locking

from  Model
static Builder
orderBy(string $column, string $type = '\'asc\'')

No description

from  Model
static Builder
take(int $limit)

No description

from  Model
static Builder
jump(int $offset = '0')

No description

from  Model
static Builder
lockForUpdate()

No description

from  Model
static Builder
sharedLock()

Aggregates & terminal reads

from  Model
static int
count(string $column = '\'*\'')

No description

from  Model
static int|float
max(string $column)

No description

from  Model
static int|float
min(string $column)

No description

from  Model
static int|float
avg(string $column)

No description

from  Model
static int|float
sum(string $column)

No description

from  Model
void
static()

?object last()

from  Model
static Collection|null
get(array $columns = '[]')

No description

from  Model
static bool
exists(?string $column = 'null', mixed $value = 'null')

No description

from  Model
static string
toSql()

Write actions

from  Model
static int
remove(string $column, mixed $comparator = '\'=\'', mixed $value = 'null')

No description

from  Model
static int
increment(string $column, int $step = '1')

No description

from  Model
static int
decrement(string $column, int $step = '1')

No description

from  Model
static bool
truncate()

No description

from  Model
mixed
getAuthenticateUserId()

Get the user id

string
getRememberTokenName()

The name of the column holding the remember-me token.

string|null
getRememberToken()

Read the current remember-me token.

void
setRememberToken(string|null $token)

Store a new remember-me token and persist it.

array
customJwtAttributes()

Define the additional values

Details

BelongsTo belongsTo(string $related, string|null $foreign_key = null, string|null $primary_key = null)

The has one relative

Parameters

string $related
string|null $foreign_key
string|null $primary_key

Return Value

BelongsTo

BelongsToMany belongsToMany(string $related, string|null $primary_key = null, string|null $foreign_key = null)

The belongs to many relative

Parameters

string $related
string|null $primary_key
string|null $foreign_key

Return Value

BelongsToMany

HasMany hasMany(string $related, string|null $foreign_key = null, string|null $primary_key = null)

The has many relative

Parameters

string $related
string|null $foreign_key
string|null $primary_key

Return Value

HasMany

Exceptions

QueryBuilderException

HasOne hasOne(string $related, string|null $foreign_key = null, string|null $primary_key = null)

The has one relative

Parameters

string $related
string|null $foreign_key
string|null $primary_key

Return Value

HasOne

abstract string getKey()

Get the table key

Return Value

string

protected void fireEvent(string $event)

Fire event

Parameters

string $event

Return Value

void

static protected string formatEventName(string $event)

Get event name

Parameters

string $event

Return Value

string

void offsetSet(mixed $offset, mixed $value)

_offsetSet

Parameters

mixed $offset
mixed $value

Return Value

void

See also

http://php.net/manual/fr/class.arrayaccess.php

bool offsetExists(mixed $offset)

_offsetExists

Parameters

mixed $offset

Return Value

bool

See also

http://php.net/manual/fr/class.arrayaccess.php

void offsetUnset(mixed $offset)

_offsetUnset

Parameters

mixed $offset

Return Value

void

See also

http://php.net/manual/fr/class.arrayaccess.php

mixed offsetGet(mixed $offset)

_offsetGet

Parameters

mixed $offset

Return Value

mixed

See also

http://php.net/manual/fr/class.arrayaccess.php

array __serialize()

Serialize model

Return Value

array

void __unserialize(array $attributes)

Unserialize

Parameters

array $attributes

Return Value

void

__construct(array $attributes = [])

Model constructor.

Parameters

array $attributes

string getTable()

Get the table name.

Return Value

string

string|null getConnection()

No description

Return Value

string|null

static Builder query()

Initialize the connection

Return Value

Builder

static Model connection(string $name)

Set the connection

Parameters

string $name

Return Value

Model

Exceptions

ConnectionException

Builder setConnection(string $name)

Set connection point

Parameters

string $name

Return Value

Builder

Exceptions

ConnectionException

static Collection all(array $columns = [])

Get all records

Parameters

array $columns

Return Value

Collection

static Model|null latest()

Get latest

Return Value

Model|null

static array|object|null first()

Get first rows

Return Value

array|object|null

static Collection retrieveBy(string $column, mixed $value)

retrieve by column name

Parameters

string $column
mixed $value

Return Value

Collection

static Collection|Model|null retrieveAndDelete(int|string|array $id, array $select = ['*'])

retrieve information and delete it

Parameters

int|string|array $id
array $select

Return Value

Collection|Model|null

static array|object|null retrieve(int|string|array $id, array $select = ['*'])

retrieve

Parameters

int|string|array $id
array $select

Return Value

array|object|null

static int delete()

No description

Return Value

int

mixed getKeyValue()

Retrieves the primary key value

Return Value

mixed

static array|object retrieveOrFail(int|string $id, array $select = ['*'])

retrieve information by id or throws an exception in data box not found

Parameters

int|string $id
array $select

Return Value

array|object

Exceptions

NotFoundException

static Model create(array $data)

Create a persist information

Parameters

array $data

Return Value

Model

int persist()

persist aliases on insert action

Return Value

int

int|bool update(array $attributes)

Delete a record

Parameters

array $attributes

Return Value

int|bool

static Pagination paginate(int $page_number, int $current = 0, int|null $chunk = null)

Pagination configuration

Parameters

int $page_number
int $current
int|null $chunk

Return Value

Pagination

static void deleted(callable $cb)

Allows to associate listener

Parameters

callable $cb

Return Value

void

static void deleting(callable $cb)

Allows to associate listener

Parameters

callable $cb

Return Value

void

static void creating(callable $cb)

Allows to associate a listener

Parameters

callable $cb

Return Value

void

static void created(callable $cb)

Allows to associate a listener

Parameters

callable $cb

Return Value

void

static void updating(callable $cb)

Allows to associate a listener

Parameters

callable $cb

Return Value

void

static void updated(callable $cb)

Allows to associate a listener

Parameters

callable $cb

Return Value

void

static int deleteBy(string $column, mixed $value)

Delete Active Record by column name

Parameters

string $column
mixed $value

Return Value

int

Exceptions

QueryBuilderException

static Builder|Collection|Model|mixed __callStatic(string $name, array $arguments)

__callStatic

Parameters

string $name
array $arguments

Return Value

Builder|Collection|Model|mixed

string getKeyType()

Retrieves the primary key

Return Value

string

bool touch()

Used to update the timestamp.

Return Value

bool

void setAttribute(string $key, string $value)

Assign a value

Parameters

string $key
string $value

Return Value

void

array getAttributes()

Retrieves the list of attributes.

Return Value

array

void setAttributes(array $attributes)

Assign values to class attributes

Parameters

array $attributes

Return Value

void

mixed getAttribute(string $key)

Allows you to recover an attribute

Parameters

string $key

Return Value

mixed

void setRelation(string $name, mixed $value)

Set a loaded relationship on the model's in-memory store.

Used by eager loading to pre-populate a relation so a later access resolves from memory instead of issuing a query.

Parameters

string $name
mixed $value

Return Value

void

array toArray()

Returns the data

Return Value

array

array jsonSerialize()

No description

Return Value

array

mixed __get(string $name)

__get

Parameters

string $name

Return Value

mixed

__set(string $name, mixed $value)

__set

Parameters

string $name
mixed $value

string __toString()

__toString

Return Value

string

string toJson()

Returns the data

Return Value

string

mixed __call(string $name, array $arguments = [])

__call

Parameters

string $name
array $arguments

Return Value

mixed

static Builder as(string $as)

No description

Parameters

string $as

Return Value

Builder

static Builder select(array $select = '[]')

No description

Parameters

array $select

Return Value

Builder

static Builder distinct(string $column)

WHERE clauses

Parameters

string $column

Return Value

Builder

static Builder where(string $column, mixed $comparator = '\'=\'', mixed $value = 'null')

No description

Parameters

string $column
mixed $comparator
mixed $value

Return Value

Builder

static Builder whereRaw(string $where, array $data = '[]')

No description

Parameters

string $where
array $data

Return Value

Builder

static Builder whereNull(string $column)

No description

Parameters

string $column

Return Value

Builder

static Builder whereNotNull(string $column)

No description

Parameters

string $column

Return Value

Builder

static Builder whereBetween(string $column, array $range)

No description

Parameters

string $column
array $range

Return Value

Builder

static Builder whereNotBetween(string $column, array $range)

No description

Parameters

string $column
array $range

Return Value

Builder

static Builder whereDifferent(string $column, mixed $value)

No description

Parameters

string $column
mixed $value

Return Value

Builder

static Builder whereIn(string $column, array $range)

No description

Parameters

string $column
array $range

Return Value

Builder

static Builder whereNotIn(string $column, array $range)

Joins

Parameters

string $column
array $range

Return Value

Builder

static Builder join(string $table, string $first, mixed $comparator = '\'=\'', ?string $second = 'null')

No description

Parameters

string $table
string $first
mixed $comparator
?string $second

Return Value

Builder

static Builder leftJoin(string $table, string $first, mixed $comparator = '\'=\'', ?string $second = 'null')

No description

Parameters

string $table
string $first
mixed $comparator
?string $second

Return Value

Builder

static Builder rightJoin(string $table, string $first, mixed $comparator = '\'=\'', ?string $second = 'null')

Grouping, ordering, limiting, locking

Parameters

string $table
string $first
mixed $comparator
?string $second

Return Value

Builder

static Builder orderBy(string $column, string $type = '\'asc\'')

No description

Parameters

string $column
string $type

Return Value

Builder

static Builder take(int $limit)

No description

Parameters

int $limit

Return Value

Builder

static Builder jump(int $offset = '0')

No description

Parameters

int $offset

Return Value

Builder

static Builder lockForUpdate()

No description

Return Value

Builder

static Builder sharedLock()

Aggregates & terminal reads

Return Value

Builder

static int count(string $column = '\'*\'')

No description

Parameters

string $column

Return Value

int

static int|float max(string $column)

No description

Parameters

string $column

Return Value

int|float

static int|float min(string $column)

No description

Parameters

string $column

Return Value

int|float

static int|float avg(string $column)

No description

Parameters

string $column

Return Value

int|float

static int|float sum(string $column)

No description

Parameters

string $column

Return Value

int|float

void static()

?object last()

Return Value

void

static Collection|null get(array $columns = '[]')

No description

Parameters

array $columns

Return Value

Collection|null

static bool exists(?string $column = 'null', mixed $value = 'null')

No description

Parameters

?string $column
mixed $value

Return Value

bool

static string toSql()

Write actions

Return Value

string

static int remove(string $column, mixed $comparator = '\'=\'', mixed $value = 'null')

No description

Parameters

string $column
mixed $comparator
mixed $value

Return Value

int

static int increment(string $column, int $step = '1')

No description

Parameters

string $column
int $step

Return Value

int

static int decrement(string $column, int $step = '1')

No description

Parameters

string $column
int $step

Return Value

int

static bool truncate()

No description

Return Value

bool

mixed getAuthenticateUserId()

Get the user id

Return Value

mixed

string getRememberTokenName()

The name of the column holding the remember-me token.

Override in the model if your column is named differently. The application must add this column to its user table: remember_token VARCHAR(100) NULL.

Return Value

string

string|null getRememberToken()

Read the current remember-me token.

Return Value

string|null

void setRememberToken(string|null $token)

Store a new remember-me token and persist it.

Parameters

string|null $token

Return Value

void

array customJwtAttributes()

Define the additional values

Return Value

array