vendredi 11 septembre 2020

Laravel test fails when i use object access(->)

I'm using laravel eloquent to retrive data.

When i run my test

echo $company['name'];

like this it passes. Bun when i do this way

echo $company->name;

It gives me next error

ErrorException: Trying to get property 'name' of non-object

Aucun commentaire:

Enregistrer un commentaire