With Eloquent you can order results by a JSON column attribute
1// JSON column example:2// bikes.settings = {"is_retired": false}3$bikes = Bike::where('athlete_id', $this->athleteId)4 ->orderBy('name')5 ->orderByDesc('settings->is_retired')6 ->get();
Tip given by @brbcoding