DatabaseNotification
class DatabaseNotification extends Model (View source)
Traits
Properties
| static protected Builder | $builder | The query builder instance |
from Model |
| $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|string[] | $casts | Cast data as json |
|
| protected string | $primary_key | The table primary key column name |
from Model |
| protected string | $primary_key_type | The primary key type |
|
| protected string | $table | The table name |
|
| protected ?string | $connection | The connection name |
from Model |
Methods
The has one relative
The belongs to many relative
The has many relative
The has one relative
Model constructor.
retrieve information and delete it
retrieve information by id or throws an exception in data box not found
Pagination configuration
__callStatic
Set a loaded relationship on the model's in-memory store.
No description
No description
No description
Grouping, ordering, limiting, locking
No description
Mark notification as read
Details
BelongsTo
belongsTo(string $related, string|null $foreign_key = null, string|null $primary_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 $foreign_key = null, string|null $primary_key = null)
The has many relative
HasOne
hasOne(string $related, string|null $foreign_key = null, string|null $primary_key = null)
The has one relative
abstract string
getKey()
Get the table key
protected void
fireEvent(string $event)
Fire event
static protected 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.
in
Model at line 222
string
getTable()
Get the table name.
in
Model at line 227
string|null
getConnection()
No description
in
Model at line 237
static Builder
query()
Initialize the connection
in
Model at line 285
static Model
connection(string $name)
Set the connection
in
Model at line 301
Builder
setConnection(string $name)
Set connection point
in
Model at line 317
static Collection
all(array $columns = [])
Get all records
in
Model at line 333
static Model|null
latest()
Get latest
in
Model at line 345
static array|object|null
first()
Get first rows
in
Model at line 357
static Collection
retrieveBy(string $column, mixed $value)
retrieve by column name
in
Model at line 373
static Collection|Model|null
retrieveAndDelete(int|string|array $id, array $select = ['*'])
retrieve information and delete it
in
Model at line 400
static array|object|null
retrieve(int|string|array $id, array $select = ['*'])
retrieve
in
Model at line 76
static int
delete()
No description
in
Model at line 455
mixed
getKeyValue()
Retrieves the primary key value
in
Model at line 469
static array|object
retrieveOrFail(int|string $id, array $select = ['*'])
retrieve information by id or throws an exception in data box not found
in
Model at line 486
static Model
create(array $data)
Create a persist information
in
Model at line 529
int
persist()
persist aliases on insert action
in
Model at line 647
int|bool
update(array $attributes)
Delete a record
in
Model at line 701
static Pagination
paginate(int $page_number, int $current = 0, int|null $chunk = null)
Pagination configuration
in
Model at line 711
static void
deleted(callable $cb)
Allows to associate listener
in
Model at line 723
static void
deleting(callable $cb)
Allows to associate listener
in
Model at line 735
static void
creating(callable $cb)
Allows to associate a listener
in
Model at line 747
static void
created(callable $cb)
Allows to associate a listener
in
Model at line 759
static void
updating(callable $cb)
Allows to associate a listener
in
Model at line 771
static void
updated(callable $cb)
Allows to associate a listener
in
Model at line 786
static int
deleteBy(string $column, mixed $value)
Delete Active Record by column name
in
Model at line 800
static Builder|Collection|Model|mixed
__callStatic(string $name, array $arguments)
__callStatic
in
Model at line 829
string
getKeyType()
Retrieves the primary key
in
Model at line 839
bool
touch()
Used to update the timestamp.
in
Model at line 854
void
setAttribute(string $key, string $value)
Assign a value
in
Model at line 864
array
getAttributes()
Retrieves the list of attributes.
in
Model at line 874
void
setAttributes(array $attributes)
Assign values to class attributes
in
Model at line 885
mixed
getAttribute(string $key)
Allows you to recover an attribute
in
Model at line 899
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.
in
Model at line 909
array
toArray()
Returns the data
in
Model at line 927
array
jsonSerialize()
No description
in
Model at line 938
mixed
__get(string $name)
__get
in
Model at line 972
__set(string $name, mixed $value)
__set
in
Model at line 982
string
__toString()
__toString
string
toJson()
Returns the data
mixed
__call(string $name, array $arguments = [])
__call
in
Model at line 76
static Builder
as(string $as)
No description
in
Model at line 76
static Builder
select(array $select = '[]')
No description
in
Model at line 76
static Builder
distinct(string $column)
WHERE clauses
in
Model at line 76
static Builder
where(string $column, mixed $comparator = '\'=\'', mixed $value = 'null')
No description
in
Model at line 76
static Builder
whereRaw(string $where, array $data = '[]')
No description
in
Model at line 76
static Builder
whereNull(string $column)
No description
in
Model at line 76
static Builder
whereNotNull(string $column)
No description
in
Model at line 76
static Builder
whereBetween(string $column, array $range)
No description
in
Model at line 76
static Builder
whereNotBetween(string $column, array $range)
No description
in
Model at line 76
static Builder
whereDifferent(string $column, mixed $value)
No description
in
Model at line 76
static Builder
whereIn(string $column, array $range)
No description
in
Model at line 76
static Builder
whereNotIn(string $column, array $range)
Joins
in
Model at line 76
static Builder
join(string $table, string $first, mixed $comparator = '\'=\'', ?string $second = 'null')
No description
in
Model at line 76
static Builder
leftJoin(string $table, string $first, mixed $comparator = '\'=\'', ?string $second = 'null')
No description
in
Model at line 76
static Builder
rightJoin(string $table, string $first, mixed $comparator = '\'=\'', ?string $second = 'null')
Grouping, ordering, limiting, locking
in
Model at line 76
static Builder
orderBy(string $column, string $type = '\'asc\'')
No description
in
Model at line 76
static Builder
take(int $limit)
No description
in
Model at line 76
static Builder
jump(int $offset = '0')
No description
in
Model at line 76
static Builder
lockForUpdate()
No description
in
Model at line 76
static Builder
sharedLock()
Aggregates & terminal reads
in
Model at line 76
static int
count(string $column = '\'*\'')
No description
in
Model at line 76
static int|float
max(string $column)
No description
in
Model at line 76
static int|float
min(string $column)
No description
in
Model at line 76
static int|float
avg(string $column)
No description
in
Model at line 76
static int|float
sum(string $column)
No description
in
Model at line 76
void
static()
?object last()
in
Model at line 76
static Collection|null
get(array $columns = '[]')
No description
in
Model at line 76
static bool
exists(?string $column = 'null', mixed $value = 'null')
No description
in
Model at line 76
static string
toSql()
Write actions
in
Model at line 76
static int
remove(string $column, mixed $comparator = '\'=\'', mixed $value = 'null')
No description
in
Model at line 76
static int
increment(string $column, int $step = '1')
No description
in
Model at line 76
static int
decrement(string $column, int $step = '1')
No description
in
Model at line 76
static bool
truncate()
No description
bool|int
markAsRead()
Mark notification as read