问题
Does anyone know if Laravel has some sort of library/plugin or tweak to use Data Mapper or to make Active Record behave like Data Mapper?.
I'm not a Laravel user,so perhaps Eloquent is using a mix of Active Record and Data Mapper and I'm not aware of that.
回答1:
So, we can implement the Data Mapper pattern into Laravel using Doctrine;
Packagist: https://packagist.org/packages/atrauzzi/laravel-doctrine
Laravel Doc: http://bundles.laravel.com/bundle/doctrine
来源:https://stackoverflow.com/questions/16923350/laravel-4-with-data-mapper