<?php

$cms_root_path = "../../../";
require_once($cms_root_path."includes/compatibility_includer.php");

use Mtc\Cms\Models\PageList as PageList;

$order = 1;

foreach ($_GET['list'] as $key => $value) {

    $pl = PageList::find($key, ["id", "order"]);
    $pl->order = $order;
    $pl->save();

    ++$order;

}

die('true');
