Solve your laravel problems.
I have two tables
users: id, name posts: id, user_id, text
How can I query all posts by a user by it's name rather than id. Something like this:
Post::with('user')->where('name','Peter')