I am trying to add an integer to an eloquent collection:
$deals = Deal::with('stuff')->where('this','=','that')->take(20)->get();
and then I am trying to append an integer to the collection like this
$deals->last_page = $count;
or like this
but I always get the following error: Object of class stdClass could not be converted to int
Any pointers would save me a good amount of hair.
Thanks in advance :)