Reply.php
//in model Reply.php
protected $appends = ['favoritesCount'];
//so when data are being called from this model, element favoritesCount are included in the json/array
//another example from stackoverflow
class User extends Eloquent {
protected $appends = array('status');
public function getStatusAttribute() {
return 'someStatus';
}
}