Looking to hire Laravel developers? Try LaraJobs

laravel-pivot-polymorph maintained by omaximus

Description
Fully polymorphic pivot relations for laravel eloquent
Last update
2024/03/14 12:40 (dev-master)
Links
Downloads
26 322

Comments
comments powered by Disqus

Polymorphic relations for eloquent.

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.