Pivot::observe()

static void observe(object|string $class, int $priority) Register an observer with the Model. Parameters object|string $class int $priority Return Value void

Pivot::newQueryWithoutScopes()

Builder|Model newQueryWithoutScopes() Get a new query builder that doesn't have any global scopes. Return Value Builder|Model

Pivot::newQueryWithoutScope()

Builder newQueryWithoutScope(Scope|string $scope) Get a new query instance without a given scope. Parameters Scope|string $scope Return Value Builder

Pivot::newQuery()

Builder newQuery() Get a new query builder for the model's table. Return Value Builder

Pivot::newPivot()

Pivot newPivot(Model $parent, array $attributes, string $table, bool $exists) Create a new pivot model instance. Parameters Model $parent array $attributes string $table bool $exists Return Value Pivot

Pivot::newInstance()

Model newInstance(array $attributes = array(), bool $exists = false) Create a new instance of the given model. Parameters array $attributes bool $exists Return Value Model

Pivot::newFromBuilder()

Model newFromBuilder(array $attributes = array(), string|null $connection = null) Create a new model instance that is existing. Parameters array $attributes string|null $connection Return Value Model

Pivot::newEloquentBuilder()

Builder|Model newEloquentBuilder(Builder $query) Create a new Eloquent query builder for the model. Parameters Builder $query Return Value Builder|Model

Pivot::newCollection()

Collection newCollection(array $models = array()) Create a new Eloquent Collection instance. Parameters array $models Return Value Collection

Pivot::morphToMany()

MorphToMany morphToMany(string $related, string $name, string $table = null, string $foreignKey = null, string $otherKey = null, bool $inverse = false) Define a polymorphic many-to-many relationship. Parameters string $related string $name string $table string $foreignKey string $otherKey bool $inverse Return Value MorphToMany