class Settings_model extends Model

Settings Model Class

Traits

Extendable Trait Allows for "Private traits"

Adds event related features to any class.

Properties

protected array $extensionData from  ExtendableTrait
static protected array $extendableCallbacks from  ExtendableTrait
static protected array $extendableStaticMethods from  ExtendableTrait
static protected bool $extendableGuardProperties from  ExtendableTrait
static protected ClassLoader $extendableClassLoader from  ExtendableTrait
protected array $emitterSingleEvents from  EventEmitter
protected array $emitterEvents from  EventEmitter
protected array $emitterEventSorted from  EventEmitter
$relation

The loaded relationships for the model.

from  HasRelationships
static protected array $relationTypes from  HasRelationships
array $implement from  Model
protected array $attributes from  Model
$timestamps from  Model
protected string $timeFormat

The storage format of the model's time columns.

from  Model
protected array $casts

The attributes that should be cast to native types.

from  Model
static protected array $eventsBooted from  Model
static protected string[] $primitiveCastTypes

The built-in, primitive cast types supported by Eloquent.

from  Model
string $configPath from  ConfigMaker
protected $configFileExtension from  ConfigMaker
protected string $table
protected string $primaryKey
protected $settingsFields
protected $fieldConfig
protected $fieldValues
protected $allItems
protected $items
static protected array $callbacks

Methods

extendableConstruct()

Constructor.

static void
extendableExtendCallback(callable $callback)

Helper method for ::extend() static method

static void
clearExtendedClasses()

Clear the list of extended classes so they will be re-extended.

string
extensionNormalizeClassName(string $name)

Normalizes the provided extension name allowing for the ClassLoader to inject aliased classes

extendClassWith(string $extensionName)

Dynamically extend a class with a specified behavior

void
extensionExtractMethods(string $extensionName, object $extensionObject)

Extracts the available methods from a behavior and adds it to the list of callable methods.

addDynamicMethod(string $dynamicName, callable $method, string $extension = null)

Programmatically adds a method to the extendable class

addDynamicProperty(string $dynamicName, string $value = null)

Programatically adds a property to the extendable class

bool
isClassExtendedWith(string $name)

Check if extendable class is extended with a behavior object

mixed
getClassExtension(string $name)

Returns a behavior object from an extendable class, example:

mixed
asExtension(string $shortName)

Short hand for getClassExtension() method, except takes the short extension name, example:

bool
methodExists(string $name)

Checks if a method exists, extension equivalent of method_exists()

array
getClassMethods()

Get a list of class methods, extension equivalent of get_class_methods()

array
getDynamicProperties()

Returns all dynamic properties and their values

bool
propertyExists(string $name)

Checks if a property exists, extension equivalent of property_exists()

bool
extendableIsAccessible(mixed $class, string $propertyName)

Checks if a property is accessible, property equivalent of is_callabe()

string
extendableGet(string $name)

Magic method for __get()

string
extendableSet(string $name, string $value)

Magic method for __set()

mixed
extendableCall(string $name, array $params = null)

Magic method for __call()

static mixed
extendableCallStatic(string $name, array $params = null)

Magic method for __callStatic()

ClassLoader|null
extensionGetClassLoader()

Gets the class loader

bindEvent(string $event, callable $callback, int $priority = 0)

Create a new event binding.

bindEventOnce(string $event, callable $callback)

Create a new event binding that fires once only

void
emitterEventSortEvents(string $eventName)

Sort the listeners for a given event by priority.

unbindEvent(string $event = null)

Destroys an event binding.

string|array
fireEvent(string $event, array $params = [], bool $halt = false)

Fire an event and call the listeners.

mixed
fireSystemEvent(string $event, array $params = [], bool $halt = true)

Fires a combination of local and global events. The first segment is removed from the event name locally and the local object is passed as the first argument to the event globally. Halting is also enabled by default.

void
addCasts(array $attributes)

Add attribute casts for the model.

getAttribute($key)

No description

getAttributeValue($key)

No description

attributesToArray()

No description

setAttribute(string $key, mixed $value)

Set a given attribute on the model.

asSerialized($value)

No description

fromSerialized($value)

No description

isSerializedCastable($key)

No description

asDateTime($value)

No description

asTime($value)

No description

string
fromTime(Carbon|int $value)

Convert a Carbon Time to a storable string.

bool
isTimeCastable(string $key)

Determine whether a value is Time castable for inbound manipulation.

string
getTimeFormat()

Get the format for database stored times.

setTimeFormat(string $format)

Set the time format used by the model.

hasRelation($name)

No description

array
getRelationDefinition(string $name)

Returns relationship details from a supplied name.

array
getRelationDefinitions()

Returns relationship details for all relations defined on this model.

string
getRelationType(string $name)

Returns a relationship type based on a supplied name.

mixed
getRelationValue(string $key)

Get a relationship.

$this
setRelationValue($relationName, $value)

Sets a relation value directly from its attribute.

string
makeRelation(string $name)

Returns a relation class object

bool
isRelationPushable(string $name)

Determines whether the specified relation should be saved when push() is called instead of save() on the model. Default: true.

array
getRelationDefaults(string $type)

Returns default relation arguments for a given type.

handleRelation($relationName)

No description

array
validateRelationArgs($relationName, $optional, array $required = [])

Validate relation supplied arguments.

HasOne
hasOne(string $related, string|null $foreignKey = null, string|null $localKey = null, null $relationName = null)

Define a one-to-one relationship.

hasOneThrough($related, $through, $primaryKey = null, $throughKey = null, $localKey = null, $secondLocalKey = null, $relationName = null)

Define a has-one-through relationship.

HasMany
hasMany(string $related, string|null $foreignKey = null, string|null $localKey = null, null $relationName = null)

Define a one-to-many relationship.

HasManyThrough
hasManyThrough(string $related, string $through, string|null $firstKey = null, string|null $secondKey = null, string|null $localKey = null, string|null $secondLocalKey = null, null $relationName = null)

Define a has-many-through relationship.

belongsTo($related, $foreignKey = null, $ownerKey = null, $relationName = null)

No description

belongsToMany($related, $table = null, $foreignPivotKey = null, $relatedPivotKey = null, $parentKey = null, $relatedKey = null, $relationName = null)

No description

MorphOne
morphOne(string $related, string $name, string|null $type = null, string|null $id = null, string|null $localKey = null, null $relationName = null)

Define a polymorphic one-to-one relationship.

MorphTo
morphEagerTo(string $name, string $type, string $id, $ownerKey)

Define a polymorphic, inverse one-to-one or many relationship.

MorphTo
morphInstanceTo(string $target, string $name, string $type, string $id, $ownerKey)

Define a polymorphic, inverse one-to-one or many relationship.

MorphMany
morphMany(string $related, string $name, string|null $type = null, string|null $id = null, string|null $localKey = null, null $relationName = null)

Define a polymorphic one-to-many relationship.

morphToMany(string $related, string $name, string|null $table = null, string|null $foreignPivotKey = null, string|null $relatedPivotKey = null, string|null $parentKey = null, string|null $relatedKey = null, bool $inverse = false, null $relationName = null)

Define a polymorphic many-to-many relationship.

morphedByMany(string $related, string $name, string|null $table = null, string|null $foreignPivotKey = null, string|null $relatedPivotKey = null, string|null $parentKey = null, string|null $relatedKey = null, null $relationName = null)

Define a polymorphic, inverse many-to-many relationship.

__construct(array $attributes = [])

No description

from  Model
static Model|Model
make(array $attributes = [])

Create a new model and return the instance.

from  Model
static Model|Model
create(array $attributes = [], string $sessionKey = null)

Save a new model and return the instance.

from  Model
Model|Model
reload()

Reloads the model attributes from the database.

from  Model
void
reloadRelations(string $relationName = null)

Reloads the model relationship cache.

from  Model
static 
extend(Closure $callback)

Extend this object properties upon construction.

from  Model
bootNicerEvents()

Bind some nicer events to this model, in the format of method overrides.

from  Model
static void
flushEventListeners()

Remove all of the event listeners for the model Also flush registry of models that had events booted Allows painless unit testing.

from  Model
Model|Model
newFromBuilder(array $attributes = [], null $connection = null)

Create a new model instance that is existing.

from  Model
beforeCreate()

Handle the "creating" model event

from  Model
afterCreate()

Handle the "created" model event

from  Model
beforeUpdate()

Handle the "updating" model event

from  Model
afterUpdate()

Handle the "updated" model event

from  Model
beforeSave()

Handle the "saving" model event

from  Model
afterSave()

Handle the "saved" model event

from  Model
beforeDelete()

Handle the "deleting" model event

from  Model
afterDelete()

Handle the "deleted" model event

from  Model
beforeFetch()

Handle the "fetching" model event

from  Model
afterFetch()

Handle the "fetched" model event

from  Model
static void
fetching(Closure|string $callback)

Create a new native event for handling beforeFetch().

from  Model
static void
fetched(Closure|string $callback)

Create a new native event for handling afterFetch().

from  Model
setUpdatedAt($value)

No description

from  Model
setCreatedAt($value)

No description

from  Model
array
getObservableEvents()

Get the observable event names.

from  Model
isRelationPurgeable($name)

No description

from  Model
newEloquentBuilder(Builder $query)

Create a new Eloquent query builder for the model.

from  Model
string
getForeignKey()

Get the default foreign key name for the model.

from  Model
__get($key)

No description

from  Model
__set($name, $value)

No description

from  Model
mixed
__call(string $method, $params)

Handle dynamic method calls into the model.

from  Model
newPivot(Model $parent, array $attributes, string $table, bool $exists, string|null $using = null)

Create a generic pivot model instance.

from  Model
newRelationPivot(string $relationName, Model $parent, array $attributes, string $table, bool $exists)

Create a pivot model instance specific to a relation.

from  Model
bool
saveInternal(array $options = [])

Save the model to the database. Is used by save()

from  Model
bool
save(array $options = null, null $sessionKey = null)

Save the model to the database.

from  Model
bool
push(array $options = null, null $sessionKey = null)

Save the model and all of its relationships.

from  Model
bool
alwaysPush(array $options = null, string $sessionKey = null)

Pushes the first level of relations even if the parent model has no changes.

from  Model
void
performDeleteOnModel()

Perform the actual delete query on this model instance.

from  Model
void
performDeleteOnRelations()

Locates relations with delete flag and cascades the delete event.

from  Model
array
loadConfig(array $configFile = [], array $requiredConfig = [], null $index = null)

Reads the contents of the supplied file and applies it to this object.

array
makeConfig(string|array $configFile, array $requiredConfig = [])

Reads the contents of the supplied file and applies it to this object.

array
mergeConfig($configLeft, $configRight)

Merges two configuration sources, either prepared or not, and returns them as a single configuration object.

string
getConfigPath(string $fileName, mixed $configPath = null)

Locates a file based on it's definition. If the file starts with the ~ symbol it will be returned in context of the application base path, otherwise it will be returned in context of the config path.

string
guessConfigPath(string $suffix = '')

Guess the package path for the called class.

string
guessConfigPathFrom(string $class, string $suffix = '')

Guess the package path from a specified class.

static 
listMenuSettingItems($menu, $item, $user)

No description

static 
getDateFormatOptions()

No description

static 
getTimeFormatOptions()

No description

static 
getPageLimitOptions()

No description

static 
getMenusPageOptions()

No description

static 
getReservationPageOptions()

No description

static 
onboardingIsComplete()

No description

static 
updatesCount()

No description

getValueAttribute()

No description

getFieldConfig($code)

No description

getFieldValues()

No description

getSettingDefinitions($code)

No description

getSettingItem($code)

No description

listSettingItems()

No description

loadSettingItems()

No description

registerSettingItems($owner, array $definitions)

No description

static 
registerCallback(callable $callback)

No description

static 
listTimezones()

No description

static 
defaultExtensions()

Extensions typically used as images.

static 
imageExtensions()

Extensions typically used as images.

static 
videoExtensions()

Extensions typically used as video files.

static 
audioExtensions()

Extensions typically used as audio files.

Details

in ExtendableTrait at line 55
extendableConstruct()

Constructor.

in ExtendableTrait at line 103
static void extendableExtendCallback(callable $callback)

Helper method for ::extend() static method

Parameters

callable $callback

Return Value

void

in ExtendableTrait at line 120
static void clearExtendedClasses()

Clear the list of extended classes so they will be re-extended.

Return Value

void

in ExtendableTrait at line 131
protected string extensionNormalizeClassName(string $name)

Normalizes the provided extension name allowing for the ClassLoader to inject aliased classes

Parameters

string $name

Return Value

string

in ExtendableTrait at line 149
void|ExtendableTrait extendClassWith(string $extensionName)

Dynamically extend a class with a specified behavior

Parameters

string $extensionName

Return Value

void|ExtendableTrait

Exceptions

Exception

in ExtendableTrait at line 178
protected void extensionExtractMethods(string $extensionName, object $extensionObject)

Extracts the available methods from a behavior and adds it to the list of callable methods.

Parameters

string $extensionName
object $extensionObject

Return Value

void

in ExtendableTrait at line 206
addDynamicMethod(string $dynamicName, callable $method, string $extension = null)

Programmatically adds a method to the extendable class

Parameters

string $dynamicName
callable $method
string $extension

in ExtendableTrait at line 225
addDynamicProperty(string $dynamicName, string $value = null)

Programatically adds a property to the extendable class

Parameters

string $dynamicName
string $value

in ExtendableTrait at line 249
bool isClassExtendedWith(string $name)

Check if extendable class is extended with a behavior object

Parameters

string $name

Fully qualified behavior name

Return Value

bool

in ExtendableTrait at line 265
mixed getClassExtension(string $name)

Returns a behavior object from an extendable class, example:

$this->getClassExtension('Admin.Actions.FormController')

Parameters

string $name

Fully qualified behavior name

Return Value

mixed

in ExtendableTrait at line 280
mixed asExtension(string $shortName)

Short hand for getClassExtension() method, except takes the short extension name, example:

$this->asExtension('FormController')

Parameters

string $shortName

Return Value

mixed

in ExtendableTrait at line 301
bool methodExists(string $name)

Checks if a method exists, extension equivalent of method_exists()

Parameters

string $name

Return Value

bool

in ExtendableTrait at line 313
array getClassMethods()

Get a list of class methods, extension equivalent of get_class_methods()

Return Value

array

in ExtendableTrait at line 326
array getDynamicProperties()

Returns all dynamic properties and their values

Return Value

array

['property' => 'value']

in ExtendableTrait at line 344
bool propertyExists(string $name)

Checks if a property exists, extension equivalent of property_exists()

Parameters

string $name

Return Value

bool

in ExtendableTrait at line 370
protected bool extendableIsAccessible(mixed $class, string $propertyName)

Checks if a property is accessible, property equivalent of is_callabe()

Parameters

mixed $class
string $propertyName

Return Value

bool

in ExtendableTrait at line 385
string extendableGet(string $name)

Magic method for __get()

Parameters

string $name

Return Value

string

in ExtendableTrait at line 410
string extendableSet(string $name, string $value)

Magic method for __set()

Parameters

string $name
string $value

Return Value

string

in ExtendableTrait at line 444
mixed extendableCall(string $name, array $params = null)

Magic method for __call()

Parameters

string $name
array $params

Return Value

mixed

in ExtendableTrait at line 483
static mixed extendableCallStatic(string $name, array $params = null)

Magic method for __callStatic()

Parameters

string $name
array $params

Return Value

mixed

in ExtendableTrait at line 552
protected ClassLoader|null extensionGetClassLoader()

Gets the class loader

Return Value

ClassLoader|null

in EventEmitter at line 36
EventEmitter bindEvent(string $event, callable $callback, int $priority = 0)

Create a new event binding.

Parameters

string $event

The event name to listen for

callable $callback

The callback to call when emitted

int $priority

Return Value

EventEmitter

in EventEmitter at line 52
EventEmitter bindEventOnce(string $event, callable $callback)

Create a new event binding that fires once only

Parameters

string $event

The event name

callable $callback

Return Value

EventEmitter

in EventEmitter at line 66
protected void emitterEventSortEvents(string $eventName)

Sort the listeners for a given event by priority.

Parameters

string $eventName

Return Value

void

in EventEmitter at line 84
EventEmitter unbindEvent(string $event = null)

Destroys an event binding.

Parameters

string $event

Event to destroy

Return Value

EventEmitter

in EventEmitter at line 124
string|array fireEvent(string $event, array $params = [], bool $halt = false)

Fire an event and call the listeners.

Parameters

string $event

Event name

array $params

Event parameters

bool $halt

Halt after first non-null result

Return Value

string|array

Collection of event results / Or single result (if halted)

in EventEmitter at line 178
mixed fireSystemEvent(string $event, array $params = [], bool $halt = true)

Fires a combination of local and global events. The first segment is removed from the event name locally and the local object is passed as the first argument to the event globally. Halting is also enabled by default.

For example:

$this->fireSystemEvent('admin.form.myEvent', ['my value']);

Is equivalent to:

$this->fireEvent('form.myEvent', ['myvalue'], true);

Event::fire('admin.form.myEvent', [$this, 'myvalue'], true);

Parameters

string $event

Event name

array $params

Event parameters

bool $halt

Halt after first non-null result

Return Value

mixed

in HasAttributes at line 19
void addCasts(array $attributes)

Add attribute casts for the model.

Parameters

array $attributes

Return Value

void

in HasAttributes at line 24
getAttribute($key)

No description

Parameters

$key

in HasAttributes at line 46
getAttributeValue($key)

No description

Parameters

$key

in HasAttributes at line 65
attributesToArray()

No description

in HasAttributes at line 111
HasAttributes setAttribute(string $key, mixed $value)

Set a given attribute on the model.

Parameters

string $key
mixed $value

Return Value

HasAttributes

in HasAttributes at line 170
protected asSerialized($value)

No description

Parameters

$value

in HasAttributes at line 175
fromSerialized($value)

No description

Parameters

$value

in HasAttributes at line 180
protected isSerializedCastable($key)

No description

Parameters

$key

in HasAttributes at line 185
protected asDateTime($value)

No description

Parameters

$value

in HasAttributes at line 197
protected asTime($value)

No description

Parameters

$value

in HasAttributes at line 242
string fromTime(Carbon|int $value)

Convert a Carbon Time to a storable string.

Parameters

Carbon|int $value

Return Value

string

in HasAttributes at line 259
protected bool isTimeCastable(string $key)

Determine whether a value is Time castable for inbound manipulation.

Parameters

string $key

Return Value

bool

in HasAttributes at line 268
protected string getTimeFormat()

Get the format for database stored times.

Return Value

string

in HasAttributes at line 280
HasAttributes setTimeFormat(string $format)

Set the time format used by the model.

Parameters

string $format

Return Value

HasAttributes

in HasRelationships at line 58
hasRelation($name)

No description

Parameters

$name

in HasRelationships at line 70
array getRelationDefinition(string $name)

Returns relationship details from a supplied name.

Parameters

string $name

Relation name

Return Value

array

in HasRelationships at line 81
array getRelationDefinitions()

Returns relationship details for all relations defined on this model.

Return Value

array

in HasRelationships at line 108
string getRelationType(string $name)

Returns a relationship type based on a supplied name.

Parameters

string $name

Relation name

Return Value

string

in HasRelationships at line 124
mixed getRelationValue(string $key)

Get a relationship.

Parameters

string $key

Return Value

mixed

in HasRelationships at line 141
protected $this setRelationValue($relationName, $value)

Sets a relation value directly from its attribute.

Parameters

$relationName
$value

Return Value

$this

in HasRelationships at line 155
string makeRelation(string $name)

Returns a relation class object

Parameters

string $name

Relation name

Return Value

string

in HasRelationships at line 177
bool isRelationPushable(string $name)

Determines whether the specified relation should be saved when push() is called instead of save() on the model. Default: true.

Parameters

string $name

Relation name

Return Value

bool

in HasRelationships at line 194
protected array getRelationDefaults(string $type)

Returns default relation arguments for a given type.

Parameters

string $type

Relation type

Return Value

array

in HasRelationships at line 206
handleRelation($relationName)

No description

Parameters

$relationName

in HasRelationships at line 334
protected array validateRelationArgs($relationName, $optional, array $required = [])

Validate relation supplied arguments.

Parameters

$relationName
$optional
array $required

Return Value

array

in HasRelationships at line 374
HasOne hasOne(string $related, string|null $foreignKey = null, string|null $localKey = null, null $relationName = null)

Define a one-to-one relationship.

Parameters

string $related
string|null $foreignKey
string|null $localKey
null $relationName

Return Value

HasOne

in HasRelationships at line 398
HasOneThrough hasOneThrough($related, $through, $primaryKey = null, $throughKey = null, $localKey = null, $secondLocalKey = null, $relationName = null)

Define a has-one-through relationship.

This code is a duplicate of Eloquent but uses a Rain relation class.

Parameters

$related
$through
$primaryKey
$throughKey
$localKey
$secondLocalKey
$relationName

Return Value

HasOneThrough

in HasRelationships at line 428
HasMany hasMany(string $related, string|null $foreignKey = null, string|null $localKey = null, null $relationName = null)

Define a one-to-many relationship.

Parameters

string $related
string|null $foreignKey
string|null $localKey
null $relationName

Return Value

HasMany

in HasRelationships at line 459
HasManyThrough hasManyThrough(string $related, string $through, string|null $firstKey = null, string|null $secondKey = null, string|null $localKey = null, string|null $secondLocalKey = null, null $relationName = null)

Define a has-many-through relationship.

Parameters

string $related
string $through
string|null $firstKey
string|null $secondKey
string|null $localKey
string|null $secondLocalKey
null $relationName

Return Value

HasManyThrough

in HasRelationships at line 487
belongsTo($related, $foreignKey = null, $ownerKey = null, $relationName = null)

No description

Parameters

$related
$foreignKey
$ownerKey
$relationName

in HasRelationships at line 508
belongsToMany($related, $table = null, $foreignPivotKey = null, $relatedPivotKey = null, $parentKey = null, $relatedKey = null, $relationName = null)

No description

Parameters

$related
$table
$foreignPivotKey
$relatedPivotKey
$parentKey
$relatedKey
$relationName

in HasRelationships at line 541
MorphOne morphOne(string $related, string $name, string|null $type = null, string|null $id = null, string|null $localKey = null, null $relationName = null)

Define a polymorphic one-to-one relationship.

Parameters

string $related
string $name
string|null $type
string|null $id
string|null $localKey
null $relationName

Return Value

MorphOne

in HasRelationships at line 572
protected MorphTo morphEagerTo(string $name, string $type, string $id, $ownerKey)

Define a polymorphic, inverse one-to-one or many relationship.

Parameters

string $name
string $type
string $id
$ownerKey

Return Value

MorphTo

in HasRelationships at line 594
protected MorphTo morphInstanceTo(string $target, string $name, string $type, string $id, $ownerKey)

Define a polymorphic, inverse one-to-one or many relationship.

Parameters

string $target
string $name
string $type
string $id
$ownerKey

Return Value

MorphTo

in HasRelationships at line 621
MorphMany morphMany(string $related, string $name, string|null $type = null, string|null $id = null, string|null $localKey = null, null $relationName = null)

Define a polymorphic one-to-many relationship.

Parameters

string $related
string $name
string|null $type
string|null $id
string|null $localKey
null $relationName

Return Value

MorphMany

in HasRelationships at line 657
MorphToMany morphToMany(string $related, string $name, string|null $table = null, string|null $foreignPivotKey = null, string|null $relatedPivotKey = null, string|null $parentKey = null, string|null $relatedKey = null, bool $inverse = false, null $relationName = null)

Define a polymorphic many-to-many relationship.

Parameters

string $related
string $name
string|null $table
string|null $foreignPivotKey
string|null $relatedPivotKey
string|null $parentKey
string|null $relatedKey
bool $inverse
null $relationName

Return Value

MorphToMany

in HasRelationships at line 705
MorphToMany morphedByMany(string $related, string $name, string|null $table = null, string|null $foreignPivotKey = null, string|null $relatedPivotKey = null, string|null $parentKey = null, string|null $relatedKey = null, null $relationName = null)

Define a polymorphic, inverse many-to-many relationship.

Parameters

string $related
string $name
string|null $table
string|null $foreignPivotKey
string|null $relatedPivotKey
string|null $parentKey
string|null $relatedKey
null $relationName

Return Value

MorphToMany

in Model at line 88
__construct(array $attributes = [])

No description

Parameters

array $attributes

in Model at line 103
static Model|Model make(array $attributes = [])

Create a new model and return the instance.

Parameters

array $attributes

Return Value

Model|Model

in Model at line 117
static Model|Model create(array $attributes = [], string $sessionKey = null)

Save a new model and return the instance.

Parameters

array $attributes
string $sessionKey

Return Value

Model|Model

Exceptions

Exception

in Model at line 129
Model|Model reload()

Reloads the model attributes from the database.

Return Value

Model|Model

in Model at line 148
void reloadRelations(string $relationName = null)

Reloads the model relationship cache.

Parameters

string $relationName

Return Value

void

in Model at line 163
static extend(Closure $callback)

Extend this object properties upon construction.

Parameters

Closure $callback

in Model at line 171
protected bootNicerEvents()

Bind some nicer events to this model, in the format of method overrides.

in Model at line 214
static void flushEventListeners()

Remove all of the event listeners for the model Also flush registry of models that had events booted Allows painless unit testing.

Return Value

void

in Model at line 229
Model|Model newFromBuilder(array $attributes = [], null $connection = null)

Create a new model instance that is existing.

Parameters

array $attributes
null $connection

Return Value

Model|Model

in Model at line 248
protected beforeCreate()

Handle the "creating" model event

in Model at line 255
protected afterCreate()

Handle the "created" model event

in Model at line 262
protected beforeUpdate()

Handle the "updating" model event

in Model at line 269
protected afterUpdate()

Handle the "updated" model event

in Model at line 276
protected beforeSave()

Handle the "saving" model event

in Model at line 283
protected afterSave()

Handle the "saved" model event

in Model at line 290
protected beforeDelete()

Handle the "deleting" model event

in Model at line 297
protected afterDelete()

Handle the "deleted" model event

in Model at line 304
protected beforeFetch()

Handle the "fetching" model event

in Model at line 311
protected afterFetch()

Handle the "fetched" model event

in Model at line 322
static void fetching(Closure|string $callback)

Create a new native event for handling beforeFetch().

Parameters

Closure|string $callback

Return Value

void

in Model at line 334
static void fetched(Closure|string $callback)

Create a new native event for handling afterFetch().

Parameters

Closure|string $callback

Return Value

void

in Model at line 339
setUpdatedAt($value)

No description

Parameters

$value

in Model at line 347
setCreatedAt($value)

No description

Parameters

$value

in Model at line 363
array getObservableEvents()

Get the observable event names.

Return Value

array

in Model at line 375
protected isRelationPurgeable($name)

No description

Parameters

$name

in Model at line 391
Builder newEloquentBuilder(Builder $query)

Create a new Eloquent query builder for the model.

Parameters

Builder $query

Return Value

Builder

in Model at line 400
string getForeignKey()

Get the default foreign key name for the model.

Return Value

string

in Model at line 409
__get($key)

No description

Parameters

$key

in Model at line 414
__set($name, $value)

No description

Parameters

$name
$value

in Model at line 427
mixed __call(string $method, $params)

Handle dynamic method calls into the model.

Parameters

string $method
$params

Return Value

mixed

in Model at line 448
Pivot newPivot(Model $parent, array $attributes, string $table, bool $exists, string|null $using = null)

Create a generic pivot model instance.

Parameters

Model $parent
array $attributes
string $table
bool $exists
string|null $using

Return Value

Pivot

in Model at line 464
Pivot newRelationPivot(string $relationName, Model $parent, array $attributes, string $table, bool $exists)

Create a pivot model instance specific to a relation.

Parameters

string $relationName
Model $parent
array $attributes
string $table
bool $exists

Return Value

Pivot

in Model at line 487
protected bool saveInternal(array $options = [])

Save the model to the database. Is used by save()

Parameters

array $options

Return Value

bool

Exceptions

Exception

in Model at line 521
bool save(array $options = null, null $sessionKey = null)

Save the model to the database.

Parameters

array $options
null $sessionKey

Return Value

bool

Exceptions

Exception

in Model at line 535
bool push(array $options = null, null $sessionKey = null)

Save the model and all of its relationships.

Parameters

array $options
null $sessionKey

Return Value

bool

Exceptions

Exception

in Model at line 577
bool alwaysPush(array $options = null, string $sessionKey = null)

Pushes the first level of relations even if the parent model has no changes.

Parameters

array $options
string $sessionKey

Return Value

bool

in Model at line 586
protected void performDeleteOnModel()

Perform the actual delete query on this model instance.

Return Value

void

in Model at line 596
protected void performDeleteOnRelations()

Locates relations with delete flag and cascades the delete event.

Return Value

void

in ConfigMaker at line 27
array loadConfig(array $configFile = [], array $requiredConfig = [], null $index = null)

Reads the contents of the supplied file and applies it to this object.

Parameters

array $configFile
array $requiredConfig
null $index

Return Value

array

in ConfigMaker at line 46
array makeConfig(string|array $configFile, array $requiredConfig = [])

Reads the contents of the supplied file and applies it to this object.

Parameters

string|array $configFile
array $requiredConfig

Return Value

array

Exceptions

SystemException

in ConfigMaker at line 97
array mergeConfig($configLeft, $configRight)

Merges two configuration sources, either prepared or not, and returns them as a single configuration object.

Parameters

$configLeft
$configRight

Return Value

array

The config array

in ConfigMaker at line 116
string getConfigPath(string $fileName, mixed $configPath = null)

Locates a file based on it's definition. If the file starts with the ~ symbol it will be returned in context of the application base path, otherwise it will be returned in context of the config path.

Parameters

string $fileName

File to load.

mixed $configPath

Explicitly define a config path.

Return Value

string

Full path to the config file.

in ConfigMaker at line 154
string guessConfigPath(string $suffix = '')

Guess the package path for the called class.

Parameters

string $suffix

An extra path to attach to the end

Return Value

string

in ConfigMaker at line 169
string guessConfigPathFrom(string $class, string $suffix = '')

Guess the package path from a specified class.

Parameters

string $class

Class to guess path from.

string $suffix

An extra path to attach to the end

Return Value

string

at line 50
static listMenuSettingItems($menu, $item, $user)

No description

Parameters

$menu
$item
$user

at line 61
static getDateFormatOptions()

No description

at line 80
static getTimeFormatOptions()

No description

at line 91
static getPageLimitOptions()

No description

at line 102
static getMenusPageOptions()

No description

at line 109
static getReservationPageOptions()

No description

at line 116
static onboardingIsComplete()

No description

at line 124
static updatesCount()

No description

at line 135
getValueAttribute()

No description

at line 146
getFieldConfig($code)

No description

Parameters

$code

at line 159
getFieldValues()

No description

at line 173
getSettingDefinitions($code)

No description

Parameters

$code

at line 178
getSettingItem($code)

No description

Parameters

$code

at line 186
listSettingItems()

No description

at line 194
loadSettingItems()

No description

at line 229
registerSettingItems($owner, array $definitions)

No description

Parameters

$owner
array $definitions

at line 265
static registerCallback(callable $callback)

No description

Parameters

callable $callback

at line 274
static listTimezones()

No description

at line 312
static defaultExtensions()

Extensions typically used as images.

This list can be customized with config:

  • system.assets.media.defaultExtensions

at line 327
static imageExtensions()

Extensions typically used as images.

This list can be customized with config:

  • system.assets.media.imageExtensions

at line 339
static videoExtensions()

Extensions typically used as video files.

This list can be customized with config:

  • system.assets.media.videoExtensions

at line 351
static audioExtensions()

Extensions typically used as audio files.

This list can be customized with config:

  • system.assets.media.audioExtensions