class Model extends Model implements CleansAttributes, Validable

Traits

Methods

static void
bootEloquence()

Boot the trait.

from Eloquence
static void
hook(string $method, string $hook)

Register hook on Eloquent method.

from Eloquence
static boolean
hasHook(string $method)

Determine whether a method has any hooks registered.

from Eloquence
array
parseMappedColumn(string $mapping)

Get the target relation and column from the mapping.

from Eloquence
static boolean
hasColumn(string $key)

Determine whether the key is meta attribute or actual table field.

from Eloquence
array
getSearchableColumns()

Get searchable columns defined on the model.

from Eloquence
static array
getColumnListing()

Get model table columns.

from Eloquence
newEloquentBuilder(Builder $query)

Create new Eloquence query builder for the instance.

from Eloquence
static void
setAttributeMutator(Mutator $mutator)

Set attribute mutator instance.

from Eloquence
static Mutator
getAttributeMutator()

Get attribute mutator instance.

from Eloquence
queryHook(Builder $query, string $method, ArgumentBag $args)

Allow custom where method calls on the builder.

from Eloquence
mixed
getAttribute(string $key)

Register hook for getAttribute.

from Eloquence
void
setAttribute(string $key, mixed $value)

Register hook for setAttribute.

from Eloquence
boolean
save(array $options = array())

Register hook for save.

from Eloquence
mixed
toArray()

Register hook for toArray.

from Eloquence
mixed
replicate(array $except = null)

Register hook for replicate.

from Eloquence
boolean
__isset(string $key)

Register hook for isset call.

from Eloquence
boolean
__unset(string $key)

Register hook for isset call.

from Eloquence
Connection
getConnection()

No description

from Eloquence
string
getTable()

No description

from Eloquence
static void
bootValidable()

Register hooks for the trait.

from Validable
boolean
isValid()

Determine whether all the attributes on this instance pass validation.

from Validable
$this
skipValidation()

Skip validation on the next saving attempt.

from Validable
$this
disableValidation($once = false)

Disable validation for this instance.

from Validable
$this
enableValidation()

Enable validation for this instance.

from Validable
integer|false
skipsValidation()

Get current validation flag.

from Validable
boolean
validationEnabled()

Determine whether validation is enabled for this instance.

from Validable
MessageBag
getValidationErrors()

Retrieve validation error messages.

from Validable
MessageBag
getMessageBag()

Retrieve validation error messages.

from Validable
array
getInvalidAttributes()

Get names of the attributes that didn't pass validation.

from Validable
Validator
getValidator()

Get the validator instance.

from Validable
static array
getValidationMessages()

Get custom validation messages.

from Validable
static array
getValidationAttributes()

Get custom validation attribute names.

from Validable
static array
getCreateRules()

Get all the validation rules for this model.

from Validable
array
getUpdateRules()

Get all validation rules for update on this model.

from Validable
static array
getUpdateRulesForId(Model|string $id)

Get all validation rules for update for given id.

from Validable
static array
getValidatedFields()

Get array of attributes that have validation rules defined.

from Validable
static void
setValidatorFactory(Factory $factory)

Set validation factory instance for this model.

from Validable
integer
getKey()

No description

from Validable
string
getKeyName()

No description

from Validable

Details

in Eloquence at line 51
static void bootEloquence()

Boot the trait.

Return Value

void

in Eloquence at line 71
static void hook(string $method, string $hook)

Register hook on Eloquent method.

Parameters

string $method
string $hook

Return Value

void

in Eloquence at line 116
static boolean hasHook(string $method)

Determine whether a method has any hooks registered.

Parameters

string $method

Return Value

boolean

in Eloquence at line 168
array parseMappedColumn(string $mapping)

Get the target relation and column from the mapping.

Parameters

string $mapping

Return Value

array

in Eloquence at line 185
static boolean hasColumn(string $key)

Determine whether the key is meta attribute or actual table field.

Parameters

string $key

Return Value

boolean

in Eloquence at line 197
array getSearchableColumns()

Get searchable columns defined on the model.

Return Value

array

in Eloquence at line 207
static array getColumnListing()

Get model table columns.

Return Value

array

in Eloquence at line 236
Builder newEloquentBuilder(Builder $query)

Create new Eloquence query builder for the instance.

Parameters

Builder $query

Return Value

Builder

in Eloquence at line 249
static void setAttributeMutator(Mutator $mutator)

Set attribute mutator instance.

Parameters

Mutator $mutator

Return Value

void

in Eloquence at line 261
static Mutator getAttributeMutator()

Get attribute mutator instance.

Return Value

Mutator

in Eloquence at line 282
Builder queryHook(Builder $query, string $method, ArgumentBag $args)

Allow custom where method calls on the builder.

Parameters

Builder $query
string $method
ArgumentBag $args

Return Value

Builder

in Eloquence at line 304
mixed getAttribute(string $key)

Register hook for getAttribute.

Parameters

string $key

Return Value

mixed

in Eloquence at line 327
void setAttribute(string $key, mixed $value)

Register hook for setAttribute.

Parameters

string $key
mixed $value

Return Value

void

in Eloquence at line 348
boolean save(array $options = array())

Register hook for save.

Parameters

array $options

Return Value

boolean

in Eloquence at line 373
mixed toArray()

Register hook for toArray.

Return Value

mixed

in Eloquence at line 393
mixed replicate(array $except = null)

Register hook for replicate.

Parameters

array $except

Return Value

mixed

in Eloquence at line 416
boolean __isset(string $key)

Register hook for isset call.

Parameters

string $key

Return Value

boolean

in Eloquence at line 438
boolean __unset(string $key)

Register hook for isset call.

Parameters

string $key

Return Value

boolean

in Eloquence at line 14
Connection getConnection()

Return Value

Connection

in Eloquence at line 14
string getTable()

Return Value

string

in Validable at line 47
static void bootValidable()

Register hooks for the trait.

Return Value

void

in Validable at line 63
boolean isValid()

Determine whether all the attributes on this instance pass validation.

Return Value

boolean

in Validable at line 75
$this skipValidation()

Skip validation on the next saving attempt.

Return Value

$this

in Validable at line 85
$this disableValidation($once = false)

Disable validation for this instance.

Parameters

$once

Return Value

$this

in Validable at line 97
$this enableValidation()

Enable validation for this instance.

Return Value

$this

in Validable at line 109
integer|false skipsValidation()

Get current validation flag.

Return Value

integer|false

in Validable at line 119
boolean validationEnabled()

Determine whether validation is enabled for this instance.

Return Value

boolean

in Validable at line 129
MessageBag getValidationErrors()

Retrieve validation error messages.

Return Value

MessageBag

in Validable at line 139
MessageBag getMessageBag()

Retrieve validation error messages.

Return Value

MessageBag

in Validable at line 149
array getInvalidAttributes()

Get names of the attributes that didn't pass validation.

Return Value

array

in Validable at line 159
Validator getValidator()

Get the validator instance.

Return Value

Validator

in Validable at line 178
static array getValidationMessages()

Get custom validation messages.

Return Value

array

in Validable at line 190
static array getValidationAttributes()

Get custom validation attribute names.

Return Value

array

in Validable at line 202
static array getCreateRules()

Get all the validation rules for this model.

Return Value

array

in Validable at line 257
array getUpdateRules()

Get all validation rules for update on this model.

Return Value

array

in Validable at line 268
static array getUpdateRulesForId(Model|string $id)

Get all validation rules for update for given id.

Parameters

Model|string $id

Return Value

array

in Validable at line 278
static array getValidatedFields()

Get array of attributes that have validation rules defined.

Return Value

array

in Validable at line 324
static void setValidatorFactory(Factory $factory)

Set validation factory instance for this model.

Parameters

Factory $factory

Return Value

void

in Validable at line 10
integer getKey()

Return Value

integer

in Validable at line 10
string getKeyName()

Return Value

string