I got this query $paid_at = $invoice->payments->last()->paid_at
which works just fine, returning a string with a date "2013-04-04" (dd, var_dump, print_r confirmed it). But when I feed it to Carbon $paid = new Carbon($paid_at);
I suddenly get this error:
ErrorException (E_NOTICE)
Trying to get property of non-object
$paid = new Carbon("2013-04-04");
works just fine too... Same with \DateTime.
Am I missing something here?