omaximus/laravel-pivot-polymorph

There is no license information available for the latest version (v2.1) of this package.

Fully polymorphic pivot relations for laravel eloquent

v2.1 2022-03-24 13:46 UTC

README

This package supports fully morph many-to-many relation.

Usage

Include trait \Pisochek\PivotPolymorph\Concerns\HasRelationships to model. Then like any other relation, write, for example:

return $this->morphsTo('parentName', 'relatedName', 'table');

Any your thoughts and corrections/extensions are much appreciated, functionality is not full yet.