Model
class Model
Properties
protected QueryBuilder | $queryBuilder | The queryBuilder instance. | |
protected array | $attributes | A key-value array of attributes of the attributes. |
Methods
No description
Delete the attributes from the database.
Update the attributes in the database.
Save the attributes to the database.
Return the primary key name.
Return the primary key value.
Create a new queryBuilder instance.
Return the parent model to be able ti use accessor and mutator methods.
Return the value of the given attribute.
Set the value of the given attribute.
Return the JSON representation of the attributes.
Return a JSON pretty version of the attributes.
Details
at line 29
__construct($attributes, $queryBuilder)
at line 46
delete()
Delete the attributes from the database.
at line 55
update($attributes = null)
Update the attributes in the database.
at line 67
save()
Save the attributes to the database.
It's an alias of update().
at line 84
protected string
getPrimaryKey()
Return the primary key name.
at line 93
protected string
getPrimaryKeyValue()
Return the primary key value.
at line 103
protected QueryBuilder
newQueryBuilder()
Create a new queryBuilder instance.
at line 114
protected Model
getParentModel()
Return the parent model to be able ti use accessor and mutator methods.
Here also we're goinf to inject the attributes to the model.
at line 134
__get($name)
Return the value of the given attribute.
at line 158
__set($name, $value)
Set the value of the given attribute.
at line 181
string
__toString()
Return the JSON representation of the attributes.
at line 191
string
dump()
Return a JSON pretty version of the attributes.