MorphOne::getForeignKey()

string getForeignKey() Get the foreign key for the relationship. Return Value string

MorphOne::getEager()

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

MorphOne::getBaseQuery()

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

MorphOne::firstOrNew()

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

MorphOne::firstOrCreate()

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

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

MorphOne::createMany()

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

MorphOne::createdAt()

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

MorphOne::create()

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

MorphOne::addEagerConstraints()

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