PHPackages                             dillingham/morphable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dillingham/morphable

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dillingham/morphable
====================

morphable functionality

1.0.1(6y ago)08MITPHP

Since Aug 23Pushed 6y agoCompare

[ Source](https://github.com/dillingham/morphable)[ Packagist](https://packagist.org/packages/dillingham/morphable)[ RSS](/packages/dillingham-morphable/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Morphable
=========

[](#morphable)

[![Latest Version on Github](https://camo.githubusercontent.com/2ed65a9ebb8ee92af28848044ab4c5c19444e6ebb50331723d0da2e30b638c78/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f64696c6c696e6768616d2f6d6f72706861626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dillingham/morphable)[![Total Downloads](https://camo.githubusercontent.com/2f6314bb3da6260b1d6ebb23a688c8cdabb5e8febeb83a4ea2b14de24e11962a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64696c6c696e6768616d2f6d6f72706861626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dillingham/morphable) [![Twitter Follow](https://camo.githubusercontent.com/1422ca8b61662d8c04396cb0fb92021ab5d6c7f03d2a5641ee4efe7c4c79344e/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f64696c6c696e6768616d6d6d3f636f6c6f723d253233316461316631266c6162656c3d54776974746572266c6f676f3d253233316461316631266c6f676f436f6c6f723d253233316461316631267374796c653d666c61742d737175617265)](https://twitter.com/dillinghammm)

```
composer require dillingham/morphable

```

- Add `Morphable` to a model
- Add `ResolveMorphs` to your base controller
- Fill `$morphable` on a controller with model classes
- Submit `type` and `id` to a controller
- adds `->forMorph($model)` to fill object\_type, object\_id

```
