移行を使用していない場合は、並べ替えIDの列はinteger
またはINT(10)にする必要があります。
残念ながら、それらはすべて必須です。はい。あなたは非常に厳格なDBスキーマにしている場合しかし、あなたは(基本的にBackpack\CRUD\app\Http\Controllers\CrudFeatures\Reorder
に1を上書きする)あなたのEntityCrudControllerに、このメソッドを追加することによって、「LFT」の欄を除くそれらのすべてを排除することができる:
public function saveReorder()
{
$this->crud->hasAccessOrFail('reorder');
$all_entries = \Request::input('tree');
if (count($all_entries)) {
$count = 0;
foreach ($all_entries as $key => $entry) {
if ($entry['item_id'] != '' && $entry['item_id'] != null) {
$item = $this->crud->model->find($entry['item_id']);
$item->lft = empty($entry['left']) ? null : $entry['left'];
$item->save();
$count++;
}
}
} else {
return false;
}
return 'success for '.$count.' items';
}
おかげで多くのことを、それは完全に動作します! –