Im trying to calculate time difference in minutes Via Laravel and Carbon.
When i get my collection from my query the result looks like this:
`
Collection {#407
#items: array:1 [
0 => ClockingSystemHours {#408
#dates: array:3 [
0 => "start_time"
1 => "end_time"
2 => "total_time"
]
#original: array:8 [
"id" => 2
"start_time" => "16:21:29"
"end_time" => "23:20:52"
"total_time" => null
"worky_id" => 2
"employee_id" => 1
"created_at" => "2019-01-24 16:21:29"
"updated_at" => "2019-01-24 16:21:29"
]
`
As you can see in the result i've set my $dates
in my Model.
But when i try to access my start_time or end_time
its resulting in this:
`
Unexpected data found.
↵Unexpected data found.
↵Data missing
`
But when i try to access worky_id
it results in 2.
What am i doing wrong? Or is there a reason why i cant access the data?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire