src/Traits/HandlesListifyModelsTrait.php
public function updatePosition($id, $newPosition = 1)
    {
        $model = $this->makeModel(false);

        if ( ! ($model = $model->find($id))) {
            return false;
        }

        $this->checkModelHasListify($model);

        /** @var ListifyInterface $model */
        $model->setListPosition( (int) $newPosition );

        return $model;
    }
public function updatePosition($id, $newPosition = 1)
    {
        $model = $this->makeModel(false);

        if ( ! ($model = $model->find($id))) {
            return false;
        }

        $this->checkModelHasListify($model);

        /** @var ListifyInterface $model */
        $model->setListPosition( (int) $newPosition );

        return $model;
    }
public function updatePosition ( $ id , $ newPosition = 1 ) { $ model = $ this -> makeModel ( false ) ; if ( ! ( $ model = $ model -> find ( $ id ) ) ) { return false ; } $ this -> checkModelHasListify ( $ model ) ; /** @var ListifyInterface $model */ $ model -> setListPosition ( ( int ) $ newPosition ) ; return $ model ; }
Updates the position for a record using Listify

@param  int $id
@param  int $newPosition     default: top spot
@return boolean
Updates the position for a record using Listify