You call $team->users while the relation on the team model has the name user.
Maybe it is good to read the relationship document to decide the relation you need to have. https://laravel.com/docs/5.6/eloquent-relationships
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community