src/Collection/Mutable.php
protected function toPosition(string $id, $position): self
    {
        $element = $this->find($id);

        return $this
            ->without($id)
            ->insert($element, $position);
    }
protected function toPosition(string $id, $position): self
    {
        $element = $this->find($id);

        return $this
            ->without($id)
            ->insert($element, $position);
    }
protected function toPosition ( string $ id , $ position ) : self { $ element = $ this -> find ( $ id ) ; return $ this -> without ( $ id ) -> insert ( $ element , $ position ) ; }
Move an element to a position.

@param string $id
@param $position

@return static
Move an element to a position .