Skip to content

Instantly share code, notes, and snippets.

@xaoc-303
Created June 19, 2015 12:19
Show Gist options
  • Select an option

  • Save xaoc-303/6d7ed95c3913d75e2959 to your computer and use it in GitHub Desktop.

Select an option

Save xaoc-303/6d7ed95c3913d75e2959 to your computer and use it in GitHub Desktop.
laravel setAppends() on collection
<?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