muharremozdemir Ya join kullanacaksınız ya da subquery
$users = User::join('posts', 'users.id', '=', 'posts.user_id')
->orderBy('posts.created_at')
->get();
ya da
$users = User::orderBy(
Post::select('created_at')
->whereColumn('posts.user_id', 'users.id')
)
->get();