public function setReorder(Request $request, $databox_id)
    {
        try {
            foreach ($request->request->get('order', []) as $data) {
                $collection = \collection::getByBaseId($this->app, $data['id']);
                $collection->set_ord($data['offset']);
            }
            $success = true;
        } catch (\Exception $e) {
            $success = false;
        }

        if ('json' === $request->getRequestFormat()) {
            return $this->app->json([
                'success' => $success,
                'msg'     => $success ? $this->app->trans('Successful update') : $this->app->trans('An error occured'),
                'sbas_id' => $databox_id,
            ]);
        }

        return $this->app->redirectPath('admin_database_display_collections_order', [
            'databox_id' => $databox_id,
            'success'    => (int) $success,
        ]);
    }