Trying to get property of non-object – Laravel 5

Is your query returning array or object? If you dump it out, you might find that it’s an array and all you need is an array access ([]) instead of an object access (->).

Leave a Comment