I want to use the Carbon on Views I'm including it on the top of the views file but it doesnt work, I'm doing it like this.
<?php use carbon/carbon;?>
@extends('main_layout')
@foreach ($myquery as $mytask)
<tr>
<td >
{{($mytask->firstname)}}
</td>
<td >
{{($mytask->lastname)}}
</td>
<td>
{{($mytask->logon)}}
</td>
@section('content')
@stop
I just get errors. I want to convert the {{($mytask->logon)}} to human readable format using carbon
->logon
? Is it mutated to carbon in your Eloquent model usinggetDates()
or accessor? – Sargassum