Published 4 days ago by thiagousa
I have two table, and i need to take just the name of all user for post.
or if using relationships: https://laravel.com/docs/5.7/eloquent-relationships
// get the post, and the user who created the post, for post id = 4 $post = Post::with('user')->find(4); echo $post->user->name;
You might want to explain a bit more.