New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

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

czim/laravel-nestedupdater

Eloquent model updater for nested relations data for Laravel.

54,240 19
stayallive/laravel-inverse-relations

HasMany, HasOne and MorphMany Eloquent relations with inverse hydration.

11,069 31
zeeshantariq/filament-attachmate

Implement a polymorphic morphMany relationship for managing attachments within F...

10,480 22
jwohlfert23/laravel-sync-relations

Package to sync nested relations from request data

7,351 0
masterfri/laravel-smart-relations

Work with relations as simple as with attributes.

1,633 6

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