Easy merging for Eloquent Models.
Via Composer
$ composer require alariva/modelmerge
$modelA = SampleModel::make(['firstname' => 'John', 'age' => 33]);
$modelB = SampleModel::make(['firstname' => 'John', 'lastname' => 'Doe']);
$mergedModel = ModelMerge::setModelA($modelA)->setModelB($modelB)->merge();
$mergedModel->firstname; // John
$mergedModel->lastname; // Doe
$mergedModel->age; // 33
Please see the changelog for more information on what has changed recently.
$ composer test
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email author email instead of using the issue tracker.
- Ariel Vallese
- Icons made by Freepik from Flaticon is licensed by CC 3.0 BY
- Icons made by Roundicons from Flaticon is licensed by CC 3.0 BY
MIT. Please see the license file for more information.