Created
February 20, 2014 08:09
-
-
Save coreymcmahon/9108912 to your computer and use it in GitHub Desktop.
Use a repository to update an object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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