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
mixed first(array $columns = array('*')) Execute the query and get the first result. Parameters array $columns Return Value mixed
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
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
Collection findMany(mixed $ids, array $columns = array('*')) Find multiple related models by their primary keys. Parameters mixed $ids array $columns Return Value Collection
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
int detach(mixed $ids = array(), bool $touch = true) Detach models from the relationship. Parameters mixed $ids bool $touch Return Value int
array createMany(array $records, array $joinings = array()) Create an array of new instances of the related models. Parameters array $records array $joinings Return Value array
string createdAt() Get the name of the "created at" column. Return Value string
Model create(array $attributes, array $joining = array(), bool $touch = true) Create a new instance of the related model. Parameters array $attributes array $joining bool $touch Return Value Model
Page 932 of 996