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 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
Details
abstract string
getKey()
Get the table key
BelongsTo
belongsTo(string $related, string $foreign_key = null, string $local_key = null)
The has one relative
BelongsToMany
belongsToMany(string $related, string $primary_key = null, string $foreign_key = null)
The belongs to many relative
HasMany
hasMany(string $related, string $primary_key = null, string $foreign_key = null)
The has many relative
HasOne
hasOne(string $related, string $primary_key = null, string $foreign_key = null)
The has one relative
offsetSet(mixed $offset, mixed $value)
_offsetSet
bool
offsetExists(mixed $offset)
_offsetExists
offsetUnset(mixed $offset)
_offsetUnset
mixed|null
offsetGet(mixed $offset)
_offsetGet
in
Model at line 130
__construct(array $attributes = [])
Model constructor.
in
Model at line 146
static Collection
all(array $columns = [])
Get all records
in
Model at line 162
static Model
first()
Get first rows
in
Model at line 172
static Model
latest()
Get last
in
Model at line 186
static Collection|Model|null
find(mixed $id, array $select = ['*'])
find
in
Model at line 210
static Collection|null
findBy(string $column, mixed $value)
Find by column name
in
Model at line 223
static mixed
describe()
Returns the description of the table
in
Model at line 236
static Collection|Model|null
findAndDelete(mixed $id, array $select = ['*'])
Find information and delete it
in
Model at line 254
static Model
findOrFail(mixed $id, array|callable $select = ['*'])
Find information by id or throws an exception in data box not found
in
Model at line 271
static Model
create(array $data)
Create a persist information
in
Model at line 315
static Collection
paginate(int $page_number, int $current = 0, int $chunk = null)
Pagination configuration
in
Model at line 326
static
deleted(callable $cb)
Allows to associate listener
in
Model at line 339
static
created(callable $cb)
Allows to associate a listener
in
Model at line 352
static
updated(callable $cb)
Allows to associate a listener
in
Model at line 365
static Builder
query()
Initialize the connection
in
Model at line 410
mixed
getKeyValue()
Retrieves the primary key value
in
Model at line 435
int
save()
Save aliases on insert action
in
Model at line 523
int
update(array $attribute)
Delete a record
in
Model at line 568
int
delete()
Delete a record
in
Model at line 598
static int
deleteBy(string $column, mixed $value)
Delete Active Record by column name
in
Model at line 612
bool
touch()
Used to update the timestamp.
in
Model at line 628
setAttributes(array $attributes)
Assign values to class attributes
in
Model at line 639
setAttribute(string $key, string $value)
Assign a value
in
Model at line 650
Builder
setConnection(string $connection)
Set connection point
in
Model at line 664
array
getAttributes()
Retrieves the list of attributes.
in
Model at line 675
mixed|null
getAttribute(string $key)
Allows you to recover an attribute
in
Model at line 697
string
getTable()
Get the table name.
in
Model at line 707
array
toArray()
Returns the data
in
Model at line 717
array
toJson()
Returns the data
in
Model at line 733
jsonSerialize()
No description
in
Model at line 752
mixed|null
__get(string $name)
__get
in
Model at line 822
__set(string $name, $value)
__set
in
Model at line 832
string
__toString()
__toString
in
Model at line 844
mixed
__call(string $name, array $arguments)
__call
in
Model at line 865
static mixed
__callStatic(string $name, array $arguments)
__callStatic
mixed
getAuthenticateUserId()
Get the user id