Are you sure that all your employees are related to valid stores? If one or more have an invalid store_id, you're going to encounter this error if you don't check before trying to output the store name.
Please show us your employee and store models, and the code you're using to retrieve and loop over them. Use http://laravel.io/bin if needed.
I think you are assigning an Array to Store before passing it to your view. use dd() to debug that store variable.
Sorry everyone. Seems an employee without a store slipped into the results.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community