Download the PHP package moneo/laravel-morphmap without Composer
On this page you can find all versions of the php package moneo/laravel-morphmap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download moneo/laravel-morphmap
More information about moneo/laravel-morphmap
Files in moneo/laravel-morphmap
Download moneo/laravel-morphmap
More information about moneo/laravel-morphmap
Files in moneo/laravel-morphmap
Vendor moneo
Package laravel-morphmap
Short Description Custom morphMap support for Laravel Framework
License MIT
Package laravel-morphmap
Short Description Custom morphMap support for Laravel Framework
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-morphmap
Laravel Custom Morph Map
This package provides use different morphMap
for different relationships.
If your polymorphic relation structures does not satisfy with each other, this package lets you use custom map for each relation definition.
PS: By default, Laravel does not support custom mapping for each relation.
Installation
composer require moneo/laravel-morphmap
Usage
This usage example covers the example data below.
Example Case:
Assume you use these tables in your project.
Example Data:
posts
id | name |
---|---|
1 | Easy Seralization in Doctrine |
videos
id | name |
---|---|
1 | Beyond Controllers in Laravel Projects |
tags
id | name |
---|---|
1 | PHP |
2 | Laravel |
3 | Doctrine |
categories
id | name |
---|---|
1 | Articles |
2 | Video Tutorials |
taggables
tag_id | taggable_id | taggable_type |
---|---|---|
1 | 1 | App\Models\Post |
3 | 1 | App\Models\Post |
1 | 1 | App\Models\Video |
2 | 1 | App\Models\Video |
categoryables
category_id | categoryable_id | categoryable_type |
---|---|---|
1 | 1 | post |
3 | 1 | post |
1 | 1 | video |
2 | 1 | video |
Contributing
Contributions are always welcome, thanks to all of our contributors!
All versions of laravel-morphmap with dependencies
PHP Build Version
Package Version
The package moneo/laravel-morphmap contains the following files
Loading the files please wait ....