src/Repositories/EloquentRepository.php
public function sort(array $data)
    {
        foreach ($data['item'] as $position => $item) {
            $page = $this->find($item['id']);

            $sortData = $this->getSortData($position + 1, $item);

            $page->update($sortData);

            if ($data['moved'] == $item['id']) {
                $this->fireResetChildrenUriEvent($page);
            }
        }
        $this->forgetCache();
    }
public function sort(array $data)
    {
        foreach ($data['item'] as $position => $item) {
            $page = $this->find($item['id']);

            $sortData = $this->getSortData($position + 1, $item);

            $page->update($sortData);

            if ($data['moved'] == $item['id']) {
                $this->fireResetChildrenUriEvent($page);
            }
        }
        $this->forgetCache();
    }
public function sort ( array $ data ) { foreach ( $ data [ 'item' ] as $ position => $ item ) { $ page = $ this -> find ( $ item [ 'id' ] ) ; $ sortData = $ this -> getSortData ( $ position + 1 , $ item ) ; $ page -> update ( $ sortData ) ; if ( $ data [ 'moved' ] == $ item [ 'id' ] ) { $ this -> fireResetChildrenUriEvent ( $ page ) ; } } $ this -> forgetCache ( ) ; }
Sort models.

@param array $data updated data

@return null
Sort models .