I query a DB that has time stamps in UNIX TIMESTAMP and I want to print just the hour minute and seconds from the time stamp like hh:mm:ss.
My controller function queries the table like this:
$latestfeed72 = Feed72::orderBy('time')->take(3)->get();
and passes it to the view via compact('latestfeed72')
Then in the blade-view I have this:
@foreach ($latestfeed72 as $feed72)
['{{$feed72->time}}', {{$feed72->data}}],
// ['2004', 1000],
// ['2005', 1170],
// ['2006', 660],
// ['2007', 1030]
@endforeach
however I am getting the UNIX TIMESTAMP like 1547665750.
Is there another function I could use? or helper?
Maybe something that would allow me to do: {{$feed72->time->format(hh:mm:ss)}}???
I have no idea. Any ideas guys?