laravel/framework — pull request #6658 by Flightfreak (2014-12-14 14:49:32+00:00)
Title: [4.2] Addition of findOrNew, firstOrNew, firstOrCreate, updateOrCreate to relevant relations.

I make extensive use of the findOrNew, firstOrNew, firstOrCreate, updateOrCreate methods in the Eloquent model but am missing them in the BelongsToMany, HasOneOrMany and MorphOneOrMany relations. I've added them myself and will write the tests if there is interest in taking this on. Thank you for considering!