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
Package info
github.com/omaximus/laravel-pivot-polymorph
pkg:composer/omaximus/laravel-pivot-polymorph
v2.1
2022-03-24 13:46 UTC
Requires
- php: >=7.1.3|^8.0
- illuminate/database: ~6.0|~7.0|~8.0
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.