Properties

$attributes

$attributes : array

All of the model's attributes.

Type

array

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

$original

$original : array

The model's attributes in their original state.

Type

array

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

$relationships

$relationships : array

The relationships that have been loaded for the query.

Type

array

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

$exists

$exists : boolean

Indicates if the model exists in the database.

Type

boolean

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

$includes

$includes : array

The relationships that should be eagerly loaded.

Type

array

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

$key

$key : string

The primary key for the model on the database table.

Type

string

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

$accessible

$accessible : array

The attributes that are accessible for mass assignment.

Type

array

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

$hidden

$hidden : array

The attributes that should be excluded from to_array.

Type

array

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

$timestamps

$timestamps : boolean

Indicates if the model has update and creation timestamps.

Type

boolean

Tags

None found

$table

$table : string

The name of the table associated with the model.

Type

string

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

$connection

$connection : string

The name of the database connection that should be used for the model.

Type

string

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

$sequence

$sequence : string

The name of the sequence associated with the model.

Type

string

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

$per_page

$per_page : integer

The default number of models to show per page when paginating.

Type

integer

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

$pivot_table

$pivot_table : string

The name of the pivot table's table.

Type

string

Tags

None found

$pivot_connection

$pivot_connection : \Laravel\Database\Eloquent\Laravel\Database\Connection

The database connection used for this model.

Type

LaravelDatabaseEloquentLaravelDatabaseConnection

Tags

None found

Methods

__construct()

__construct(string  $table, string  $connection = null) : void

Create a new pivot table instance.

Parameters

string $table
string $connection

Tags

None found

fill()

fill(array  $attributes, boolean  $raw = false) : \Laravel\Database\Eloquent\Model

Hydrate the model with an array of attributes.

Parameters

array $attributes
boolean $raw

Returns

LaravelDatabaseEloquentModel

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

fill_raw()

fill_raw(array  $attributes) : \Laravel\Database\Eloquent\Model

Fill the model with the contents of the array.

No mutators or accessibility checks will be accounted for.

Parameters

array $attributes

Returns

LaravelDatabaseEloquentModel

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

accessible()

accessible(array  $attributes = null) : void

Set the accessible attributes for the given model.

Parameters

array $attributes

static
Inherited from
LaravelDatabaseEloquentModel

Tags

None found

create()

create(array  $attributes) : \Laravel\Database\Eloquent\Model|false

Create a new model and store it in the database.

If save is successful, the model will be returned, otherwise false.

Parameters

array $attributes

Returns

LaravelDatabaseEloquentModel|false

static
Inherited from
LaravelDatabaseEloquentModel

Tags

None found

update()

update(mixed  $id, array  $attributes) : integer

Update a model instance in the database.

Parameters

mixed $id
array $attributes

Returns

integer

static
Inherited from
LaravelDatabaseEloquentModel

Tags

None found

all()

all() : array

Get all of the models in the database.

Returns

array

static
Inherited from
LaravelDatabaseEloquentModel

Tags

None found

_with()

_with(array  $includes) : \Laravel\Database\Eloquent\Model

The relationships that should be eagerly loaded by the query.

Parameters

array $includes

Returns

LaravelDatabaseEloquentModel

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

has_one()

has_one(string  $model, string  $foreign = null) : \Laravel\Database\Eloquent\Relationship

Get the query for a one-to-one association.

Parameters

string $model
string $foreign

Returns

LaravelDatabaseEloquentRelationship

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

has_many()

has_many(string  $model, string  $foreign = null) : \Laravel\Database\Eloquent\Relationship

Get the query for a one-to-many association.

Parameters

string $model
string $foreign

Returns

LaravelDatabaseEloquentRelationship

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

belongs_to()

belongs_to(string  $model, string  $foreign = null) : \Laravel\Database\Eloquent\Relationship

Get the query for a one-to-one (inverse) relationship.

Parameters

string $model
string $foreign

Returns

LaravelDatabaseEloquentRelationship

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

has_many_and_belongs_to()

has_many_and_belongs_to(string  $model, string  $table = null, string  $foreign = null, string  $other = null) : \Laravel\Database\Eloquent\Relationships\Has_Many_And_Belongs_To

Get the query for a many-to-many relationship.

Parameters

string $model
string $table
string $foreign
string $other

Returns

LaravelDatabaseEloquentRelationshipsHas_Many_And_Belongs_To

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

push()

push() : boolean

Save the model and all of its relations to the database.

Returns

boolean

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

save()

save() : boolean

Save the model instance to the database.

Returns

boolean

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

delete()

delete() : integer

Delete the model from the database.

Returns

integer

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

timestamp()

timestamp() : void

Set the update and creation timestamps on the model.

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

touch()

touch() : void

Updates the timestamp on the model and immediately saves it.

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

sync()

sync() : boolean

Sync the original attributes with the current attributes.

Returns

boolean

final
Inherited from
LaravelDatabaseEloquentModel

Tags

None found

changed()

changed(string  $attribute) : boolean

Determine if a given attribute has changed from its original state.

Parameters

string $attribute

Returns

boolean

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

dirty()

dirty() : boolean

Determine if the model has been changed from its original state.

Models that haven't been persisted to storage are always considered dirty.

Returns

boolean

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

table()

table() : string

Get the name of the pivot table.

Returns

string

Tags

None found

get_dirty()

get_dirty() : array

Get the dirty attributes for the model.

Returns

array

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

get_key()

get_key() : integer

Get the value of the primary key for the model.

Returns

integer

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

set_key()

set_key(integer  $value) : void

Set the value of the primary key for the model.

Parameters

integer $value

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

get_attribute()

get_attribute(string  $key) 

Get a given attribute from the model.

Parameters

string $key

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

set_attribute()

set_attribute(string  $key, mixed  $value) : \Laravel\Database\Eloquent\Model

Set an attribute's value on the model.

Parameters

string $key
mixed $value

Returns

LaravelDatabaseEloquentModel

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

purge()

purge(string  $key) 

Remove an attribute from the model.

Parameters

string $key

final
Inherited from
LaravelDatabaseEloquentModel

Tags

None found

to_array()

to_array() : array

Get the model attributes and relationships in array form.

Returns

array

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

__get()

__get(string  $key) : mixed

Handle the dynamic retrieval of attributes and associations.

Parameters

string $key

Returns

mixed

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

__set()

__set(string  $key, mixed  $value) : void

Handle the dynamic setting of attributes.

Parameters

string $key
mixed $value

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

__isset()

__isset(string  $key) : boolean

Determine if an attribute exists on the model.

Parameters

string $key

Returns

boolean

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

__unset()

__unset(string  $key) : void

Remove an attribute from the model.

Parameters

string $key

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

__call()

__call(string  $method, array  $parameters) : mixed

Handle dynamic method calls on the model.

Parameters

string $method
array $parameters

Returns

mixed

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

__callStatic()

__callStatic(string  $method, array  $parameters) : mixed

Dynamically handle static method calls on the model.

Parameters

string $method
array $parameters

Returns

mixed

static
Inherited from
LaravelDatabaseEloquentModel

Tags

None found

connection()

connection() : string

Get the connection used by the pivot table.

Returns

string

Tags

None found

has_one_or_many()

has_one_or_many(string  $type, string  $model, string  $foreign) : \Laravel\Database\Eloquent\Relationship

Get the query for a one-to-one / many association.

Parameters

string $type
string $model
string $foreign

Returns

LaravelDatabaseEloquentRelationship

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

_query()

_query() : \Laravel\Database\Eloquent\Query

Get a new fluent query builder instance for the model.

Returns

LaravelDatabaseEloquentQuery

Inherited from
LaravelDatabaseEloquentModel

Tags

None found

fire_event()

fire_event(string  $event) : array

Fire a given event for the model.

Parameters

string $event

Returns

array

Inherited from
LaravelDatabaseEloquentModel

Tags

None found