My Blade file runs a foreach on the variable $open_quotes. This variable is an array generated from a query on the DB. It contains the DB value "created_at". It all works well, except that the "created_at" date comes out on the HTML as Year Month Day Minutes Seconds. I want the date presented as Day Month Year Minutes.
I know you can format the date inside Laravel, but can I do that inside a Blade file ?
@foreach($open_quotes as $quotes)
<tr>
<td> <a href="quote_edit/{{ $quotes->reference}}">{{$quotes->reference}}</a></td>
<td> {{$quotes->lastname1}}</td>
<td> {{$quotes->address}}</td>
<td>{{$quotes->created_at}}</td> // THIS NEEDS TO BE REFORMATTED
<td>{{$quotes->status}}</td>
</tr>
@endforeach
@bobbybouwmann HI Bobby - thanks for that. Maybe I misunderstood your answer. The way I read your answer required that I format this inside Laravel. I want to format the date inside Blade.
@otepas Thanks for that. Unfortunately that does not work either, I get the error:
ErrorException in Carbon.php line 414:
Unexpected data found.
Unexpected data found.
Unexpected data found.
Trailing data (View: /var/www/auburntree/resources/views/quotations/open_quotes.blade.php)
@thomaskim@DPJack I am using eloquent. Because I have a lot of JQuery calculated fields in my form, plus a have a 35 row form made up of arrays, I am using it like this: