Authentication
class Authentication extends Model (View source)
Traits
Properties
$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 bool | $soft_delete | Enable the soft deletion |
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 |
static protected Builder | $builder | The query builder instance |
from Model |
Methods
The has one relative
The belongs to many relative
The has many relative
The has one relative
Find information and delete it
Find information by id or throws an exception in data box not found
Pagination configuration
Get the user id
Define the additional values
Details
abstract string
getKey()
Get the table key
BelongsTo
belongsTo(string $related, string|null $foreign_key = null, string|null $local_key = null)
The has one relative
BelongsToMany
belongsToMany(string $related, string|null $primary_key = null, string|null $foreign_key = null)
The belongs to many relative
HasMany
hasMany(string $related, string|null $primary_key = null, string|null $foreign_key = null)
The has many relative
HasOne
hasOne(string $related, string|null $foreign_key = null, string|null $primary_key = null)
The has one relative
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
in
Model at line 158
__construct(array $attributes = [])
Model constructor.
in
Model at line 174
static Model
connection(string $name)
Set the connection
in
Model at line 190
static Collection
all(array $columns = [])
Get all records
in
Model at line 206
static Model|null
first()
Get first rows
in
Model at line 216
static Model|null
latest()
Get latest
in
Model at line 230
static Model|null
find(int|string|array $id, array $select = ['*'])
find
in
Model at line 254
static Collection
findBy(string $column, mixed $value)
Find by column name
in
Model at line 270
static Model|null
findAndDelete(int|string|array $id, array $select = ['*'])
Find information and delete it
in
Model at line 299
static Model
findOrFail(int|string $id, array $select = ['*'])
Find information by id or throws an exception in data box not found
in
Model at line 316
static Model
create(array $data)
Create a persist information
in
Model at line 357
static Pagination
paginate(int $page_number, int $current = 0, int|null $chunk = null)
Pagination configuration
in
Model at line 368
static void
deleted(callable $cb)
Allows to associate listener
in
Model at line 381
static void
deleting(callable $cb)
Allows to associate listener
in
Model at line 394
static void
creating(callable $cb)
Allows to associate a listener
in
Model at line 407
static void
created(callable $cb)
Allows to associate a listener
in
Model at line 420
static void
updating(callable $cb)
Allows to associate a listener
in
Model at line 433
static void
updated(callable $cb)
Allows to associate a listener
in
Model at line 446
static Builder
query()
Initialize the connection
in
Model at line 536
int
save()
Save aliases on insert action
in
Model at line 608
int|bool
update(array $attributes)
Delete a record
in
Model at line 656
int
delete()
Delete a record
in
Model at line 692
static int
deleteBy(string $column, mixed $value)
Delete Active Record by column name
in
Model at line 704
mixed
getKeyValue()
Retrieves the primary key value
in
Model at line 724
string
getKeyType()
Retrieves the primary key
in
Model at line 734
bool
touch()
Used to update the timestamp.
in
Model at line 748
void
setAttributes(array $attributes)
Assign values to class attributes
in
Model at line 759
void
setAttribute(string $key, string $value)
Assign a value
in
Model at line 771
Builder
setConnection(string $name)
Set connection point
in
Model at line 785
array
getAttributes()
Retrieves the list of attributes.
in
Model at line 796
mixed
getAttribute(string $key)
Allows you to recover an attribute
in
Model at line 818
string
getTable()
Get the table name.
in
Model at line 828
array
toArray()
Returns the data
in
Model at line 840
string
toJson()
Returns the data
in
Model at line 852
array
jsonSerialize()
No description
in
Model at line 865
mixed
__get(string $name)
__get
in
Model at line 939
__set(string $name, mixed $value)
__set
in
Model at line 949
string
__toString()
__toString
in
Model at line 961
mixed
__call(string $name, array $arguments = [])
__call
in
Model at line 982
static mixed
__callStatic(string $name, array $arguments)
__callStatic
in
Model at line 27
void
select(array|string[] $select)
No description
in
Model at line 27
void
whereIn(string $primary_key, array $id)
No description
in
Model at line 27
void
get()
No description
in
Model at line 27
void
where(string $column, mixed $value)
No description
in
Model at line 27
void
orderBy(string $latest, string $string)
No description
mixed
getAuthenticateUserId()
Get the user id
array
customJwtAttributes()
Define the additional values