alexcrawford/lexorank-php
Simple PHP implementation of Atlassian JIRA’s LexoRank for ordering database lists. Reorder items in O(1) by updating only the moved row’s rank value, avoiding mass updates and costly transactions.
Installation:
composer require alexcrawford/lexorank-php
No additional configuration is required—just autoload the package.
First Use Case:
Create a LexoRank instance and insert items with ranks:
use AlexCrawford\LexoRank\LexoRank;
$lexoRank = new LexoRank();
$item1 = $lexoRank->insert(); // Returns a rank (e.g., "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
How can I help you explore Laravel packages today?