omaximus/laravel-pivot-polymorph

Fully polymorphic pivot relations for laravel eloquent
26,322 2
Install
composer require omaximus/laravel-pivot-polymorph
Latest Version:v2.1
PHP:>=7.1.3|^8.0
Laravel:6 · 7 · 8
Older releases:5
Last Updated:Mar 14, 2024
Links: GitHub  ·  Packagist
Maintainer: omaximus

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.

Related Packages

ricktap/qriteria

Automatic url parameter mapping to sort, filter, include and select data in an e...

44 6
srlabs/parley

Polymorphic Messaging for Laravel

523 14
fish/eloquent-cascade

Cascading delete trait for Laravel's Eloquent

2,059 3
czim/laravel-nestedupdater

Eloquent model updater for nested relations data for Laravel.

53,965 19

Version History

Version Released PHP Laravel License
v2.1 >=7.1.3|^8.0 ~6.0|~7.0|~8.0
v2.0 >=7.1.3 ~6.0
v1.0.11 >=5.6.4 ^5.0
v1.0.10 >=5.6.4 ^5.0
v1.0.9 >=5.6.4 ^5.0,<5.7