dvlpp / merx

Laravel 5.2+ shopping cart package
7 stars 2 forks source link

Support multiple domain object mapper ? #2

Open RemiCollin opened 8 years ago

RemiCollin commented 8 years ago

As the CartItem model supports a polymorphic relationship to a domain object, maybe it would make sense to support several mappers in config. Eg :

 "item_mappers" => [
    App\SomeModel::class => App\MerxItemMapper::class,
    App\OtherModel::class => App\OtherItemMapper::class,
]
dvlpp commented 8 years ago

Yeah, would be great. I will add this in a future release.