LaravelDatabaseEloquentQuery

Summary

No protected properties found
N/A
No private methods found
No private properties found
N/A
File
databaseeloquentquery.php
Package
Default
Class hierarchy
LaravelDatabaseEloquentQuery

Tags

None found

Properties

$model

$model : \Laravel\Database\Eloquent\Model

The model instance being queried.

Type

LaravelDatabaseEloquentModel

Tags

None found

$table

$table : \Laravel\Database\Eloquent\Query

The fluent query builder for the query instance.

Type

LaravelDatabaseEloquentQuery

Tags

None found

$includes

$includes : array

The relationships that should be eagerly loaded by the query.

Type

array

Tags

None found

$passthru

$passthru : array

The methods that should be returned from the fluent query builder.

Type

array

Tags

None found

Methods

__construct()

__construct(\Laravel\Database\Eloquent\Model  $model) : void

Creat a new query instance for a model.

Parameters

LaravelDatabaseEloquentModel $model

Tags

None found

find()

find(mixed  $id, array  $columns = array('*')) : mixed

Find a model by its primary key.

Parameters

mixed $id
array $columns

Returns

mixed

Tags

None found

first()

first(array  $columns = array('*')) : mixed

Get the first model result for the query.

Parameters

array $columns

Returns

mixed

Tags

None found

get()

get(array  $columns = array('*')) : array

Get all of the model results for the query.

Parameters

array $columns

Returns

array

Tags

None found

paginate()

paginate(integer  $per_page = null, array  $columns = array('*')) : \Laravel\Database\Eloquent\Paginator

Get an array of paginated model results.

Parameters

integer $per_page
array $columns

Returns

LaravelDatabaseEloquentPaginator

Tags

None found

hydrate()

hydrate(\Laravel\Database\Eloquent\Model  $model, array  $results) : array

Hydrate an array of models from the given results.

Parameters

LaravelDatabaseEloquentModel $model
array $results

Returns

array

Tags

None found

connection()

connection() : \Laravel\Database\Eloquent\Connection

Get the database connection for the model.

Returns

LaravelDatabaseEloquentConnection

Tags

None found

__call()

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

Handle dynamic method calls to the query.

Parameters

string $method
array $parameters

Returns

mixed

Tags

None found

load()

load(array  $results, string  $relationship, array|null  $constraints) : void

Hydrate an eagerly loaded relationship on the model results.

Parameters

array $results
string $relationship
array|null $constraints

Tags

None found

nested_includes()

nested_includes(string  $relationship) : array

Gather the nested includes for a given relationship.

Parameters

string $relationship

Returns

array

Tags

None found

model_includes()

model_includes() : array

Get the eagerly loaded relationships for the model.

Returns

array

Tags

None found

table()

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

Get a fluent query builder for the model.

Returns

LaravelDatabaseEloquentQuery

Tags

None found