I have my installation of laravel 4 under HHVM, and i set up as a accessory on my eloquent an converter date from SQL date to human.
doing something like that:
public function getDateSpanAttribute($value)
{
return $value = \Carbon\Carbon::createFromFormat('Y-m-d H:i:s',$this->created_at)->diffForHumans();
}
This method work well under php5, no error just work. On HHVM this accessory throw me an exception saying,
{"error":{"type":"InvalidArgumentException","message":"Unknown setter '_date_time'","file":"/var/www/mynextmatch/vendor/nesbot/carbon/src/Carbon/Carbon.php","line":542}}
I saw the source of Carbon on that row and it is the magic method __get() to give this problem but i cannot figure out why it happening.
I will appreciate same help. Thanks