cline/morphism
Reusable polymorphic key mapping for Laravel packages
Maintainers
2.0.3
2026-03-18 16:45 UTC
Requires
- php: ^8.5.0
- facade/ignition-contracts: ^1.0.2
- laravel/framework: ^10.0 || ^11.0 || ^12.0 || ^13.0
Requires (Dev)
- cline/coding-standard: ^2.0.1
- orchestra/testbench: ^8.0 || ^9.0 || ^10.9
- symfony/var-dumper: ^6.0 || ^7.4.6 || ^8.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
👁 GitHub Workflow Status
👁 Latest Version on Packagist
👁 Software License
👁 Total Downloads
Reusable polymorphic key mapping for Laravel packages. Provides a central registry to manage which primary key column (id, uuid, ulid) each model uses in polymorphic relationships.
Requirements
Requires PHP 8.4+ and Laravel 12+
Installation
composer require cline/morphism
Documentation
- Migrations - Blueprint macros for polymorphic columns
- Basic Usage - Core registry operations
- Strict Enforcement - Require all models to be mapped
- Config-Based Setup - Configure via config files
- Package Integration - Integrate into your own packages
- Testing - Testing patterns and best practices
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.
Credits
License
The MIT License. Please see License File for more information.
