This is a strange one (for me at least), I'm trying to pass an object to a function like so:
272. $runs[$key]['position'] = getTimePosition($run->times,$user['id']);
273. dd($run->times);
When I do it I get the error
message: "Trying to get property 'times' of non-object", exception: "ErrorException",…}
exception: "ErrorException"
file: "C:\Users\Test\PhpstormProjects\test\app\Helpers\Helper.php"
line: 272
message: "Trying to get property 'times' of non-object"
However, if I dump $run->times I get what seems to be correct, an Eloquent object with "times" as shown below...
What am I missing here? It's been bugging me for an hour
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire