MorphPivot::addHidden()

void addHidden(array|string|null $attributes = null) Add hidden attributes for the model. Parameters array|string|null $attributes Return Value void

MorphPivot::addGlobalScope()

static void addGlobalScope(ScopeInterface $scope) Register a new global scope on the model. Parameters ScopeInterface $scope Return Value void

MorphPivot

MorphPivot class MorphPivot extends Pivot (View source) Constants CREATED_AT The name of the "created at" column. UPDATED_AT The name of the "updated at" column.

MorphOneOrMany::__construct()

void __construct(Builder $query, Model $parent, string $type, string $id, string $localKey) Create a new morph one or many relationship instance. Parameters Builder $query Model $parent string $type string $id string $localKey Return Value void

MorphOneOrMany::__clone()

void __clone() Force a clone of the underlying query builder when cloning. Return Value void

MorphOneOrMany::__call()

mixed __call(string $method, array $parameters) Handle dynamic method calls to the relationship. Parameters string $method array $parameters Return Value mixed

MorphOneOrMany::wrap()

string wrap(string $value) Wrap the given value with the parent query's grammar. Parameters string $value Return Value string

MorphOneOrMany::updateOrCreate()

Model updateOrCreate(array $attributes, array $values = array()) Create or update a related record matching the attributes, and fill it with values. Parameters array $attributes array $values Return Value Model

MorphOneOrMany::updatedAt()

string updatedAt() Get the name of the "updated at" column. Return Value string

MorphOneOrMany::update()

int update(array $attributes) Perform an update on all the related models. Parameters array $attributes Return Value int