HasOneOrMany::getEager()

Collection getEager() Get the relationship for eager loading. Return Value Collection

HasOneOrMany::getBaseQuery()

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

HasOneOrMany::firstOrNew()

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

HasOneOrMany::firstOrCreate()

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

HasOneOrMany::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

HasOneOrMany::createMany()

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

HasOneOrMany::createdAt()

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

HasOneOrMany::create()

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

HasOneOrMany::addEagerConstraints()

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

HasOneOrMany::addConstraints()

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