bosnadev / repository

Laravel Repositories is a package for Laravel 5 which is used to abstract the database layer. This makes applications much easier to maintain.
https://bosnadev.com
823 stars 233 forks source link

Added updateOrCreate function #63

Open casenjo opened 8 years ago

casenjo commented 8 years ago

The Repository class is missing a very useful function to be able to create a model if it doesn't exist, or update it if it does.

The updateOrCreate($attributes, $values) function was added to the Repository contract and abstract class to account for this.