I have this code when displaying list of invoices, this is similar or maybe exactly the same to the ones in the official Laravel Cashier documentation. I am getting this weird DateTime::__construct(): Failed to parse time string (@) at position 0 (@): Unexpected character error and I'm not sure what's the @ character doing in replace of a supposed to be date.
@foreach (Auth::user()->invoices() as $invoice)
<tr>
<td>{{ $invoice->date()->toFormattedDateString() }}</td>
<td>{{ $invoice->total() }}</td>
<td>
<a href="/user/invoice/{{ $invoice->id }}">Download</a>
</td>
</tr>
@endforeach
Does anyone have a similar experience? I have also tried to just var_dump each $invoice->date() in the controller but the error is still the same. The line $invoice->date()->toFormattedDateString() is causing the error because the invoice date is NULL. I followed the Laravel Cashier Stripe documentation but I am getting this error. When downloading invoices, the error is also the same because the invoice date is NULL.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community