Builder::findOrNew()

Model findOrNew(mixed $id, array $columns = array('*')) Find a model by its primary key or return fresh model instance. Parameters mixed $id array $columns Return Value Model

Builder::first()

Model|Builder|null first(array $columns = array('*')) Execute the query and get the first result. Parameters array $columns Return Value Model|Builder|null

Builder::findOrFail()

Model|Collection findOrFail(mixed $id, array $columns = array('*')) Find a model by its primary key or throw an exception. Parameters mixed $id array $columns Return Value Model|Collection Exceptions ModelNotFoundException

Builder::find()

mixed|Builder find(int $id, array $columns = array('*')) Execute a query for a single record by ID. Parameters int $id array $columns Return Value mixed|Builder

Builder::findMany()

Collection findMany(array $ids, array $columns = array('*')) Find multiple models by their primary keys. Parameters array $ids array $columns Return Value Collection

Builder::find()

Model|Collection|Builder[]|Builder|null find(mixed $id, array $columns = array('*')) Find a model by its primary key. Parameters mixed $id array $columns Return Value Model|Collection|Builder[]|Builder|null

Builder::eagerLoadRelations()

array eagerLoadRelations(array $models) Eager load the relationships for the models. Parameters array $models Return Value array

Builder::each()

bool each(callable $callback, int $count = 1000) Execute a callback over each item while chunking. Parameters callable $callback int $count Return Value bool Exceptions RuntimeException

Builder::enableForeignKeyConstraints()

bool enableForeignKeyConstraints() Enable foreign key constraints. Return Value bool

Builder::exists()

bool exists() Determine if any rows exist for the current query. Return Value bool