Skip to content

Instantly share code, notes, and snippets.

@coreymcmahon
Created February 20, 2014 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coreymcmahon/9108912 to your computer and use it in GitHub Desktop.
Save coreymcmahon/9108912 to your computer and use it in GitHub Desktop.
Use a repository to update an object
<?php
// resolve the dependency
$repo = App::make('Acme\Repositories\ObjectRepository');
// update the entity
$repo->update($object->id, array(
'attribute' => 'new value',
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment