Laravel 5按关系排序雄辩的模型

I have a model that I want to sort based on a relationship property.

The main model, Resultado, has a relation respondente, of type belongsTo, and respondente has a relation usuario.

I want to get Resultado with those relations and sort the results by usuario name property (column).

I tried

$resultados = Diagnostico\Resultado::with('respondente.usuario')
    ->orderBy('usuarios.name')->get();

but that trows a "Column not found 'usuarios.name'" mysql error.

How can I sort the Resultado model based on its relationships?

EDIT:

The table for Resultado model is diag_resultados. As I wrote in the comments, I had to use join to achieve the right result.

You need to do a sub query

 $resultados = Diagnostico\Resultado::with(['respondente.usuario' => function ($query) {
        $query->orderBy('usuarios.name', 'asc');
    }])->get();

something like that should work

Using join instead with works.

$resultados = Diagnostico\Resultado::join('usuarios', 'diag_resultados.respondente_id', '=', 'usuarios.perfil_id')->get()->sortBy('name');