Created
June 19, 2015 12:19
-
-
Save xaoc-303/6d7ed95c3913d75e2959 to your computer and use it in GitHub Desktop.
laravel setAppends() on collection
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 | |
| $collection->each(function($model) { $model->setAppends(['likes_count', 'time_offset']); }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment