public function setTeamOrder(Request $request) { if (!$request->user()->hasRole('admin')) { return abort(403, 'You do not have permission to perform that action'); } $this->validate($request, ['order' => 'required|array']); TeamMember::setNewOrder($request->order); return response()->json('ok'); }