I have a query, it turns out that in my Events handler I receive all the events of a teacher but I would like to sort them by date
This is the index of my controller
public function index(Request $request)
{
$profesor = Profesor::find(auth('profesor')->user()->id);
$mis_eventos = $profesor->eventos->all();
return view('eventos.index')->with('mis_eventos',$mis_eventos)->with('profesor',$profesor)->with('i', ($request->input('page', 1) - 1) * 5);
}
In what part should I place the order by?