MorphToMany::getBaseQuery()

Builder getBaseQuery() Get the base query builder driving the Eloquent builder. Return Value Builder

MorphToMany::get()

Collection get(array $columns = array('*')) Execute the query as a "select" statement. Parameters array $columns Return Value Collection

MorphToMany::firstOrNew()

Model firstOrNew(array $attributes) Get the first related model record matching the attributes or instantiate it. Parameters array $attributes Return Value Model

MorphToMany::firstOrFail()

Model|BelongsToMany firstOrFail(array $columns = array('*')) Execute the query and get the first result or throw an exception. Parameters array $columns Return Value Model|BelongsToMany Exceptions ModelNotFoundException

MorphToMany::firstOrCreate()

Model firstOrCreate(array $attributes, array $joining = array(), bool $touch = true) Get the first related record matching the attributes or create it. Parameters array $attributes array $joining bool $touch Return Value Model

MorphToMany::first()

mixed first(array $columns = array('*')) Execute the query and get the first result. Parameters array $columns Return Value mixed

MorphToMany::findOrNew()

Collection|Model findOrNew(mixed $id, array $columns = array('*')) Find a related model by its primary key or return new instance of the related model. Parameters mixed $id array $columns Return Value Collection|Model

MorphToMany::findOrFail()

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

MorphToMany::findMany()

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

MorphToMany::find()

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