HasMany::getBaseQuery()

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

HasMany::firstOrNew()

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

HasMany::firstOrCreate()

Model firstOrCreate(array $attributes) Get the first related record matching the attributes or create it. Parameters array $attributes Return Value Model

HasMany::findOrNew()

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

HasMany::createMany()

array createMany(array $records) Create an array of new instances of the related model. Parameters array $records Return Value array

HasMany::createdAt()

string createdAt() Get the name of the "created at" column. Return Value string

HasMany::create()

Model create(array $attributes) Create a new instance of the related model. Parameters array $attributes Return Value Model

HasMany::addEagerConstraints()

void addEagerConstraints(array $models) Set the constraints for an eager load of the relation. Parameters array $models Return Value void

HasMany::addConstraints()

void addConstraints() Set the base constraints on the relation query. Return Value void

HasMany

HasMany class HasMany extends HasOneOrMany (View source) Methods void __construct(Builder $query, Model $parent, string $foreignKey, string $localKey) Create a new has one or many relationship instance. from HasOneOrMany void addConstraints() Set the base constraints on the relation query. from HasOneOrMany void addEagerConstraints(array $models) Set the constraints for an eager load of the relation. from HasOneOrMany array initRelation(array $models, string $relation) Initial