umbrellio/laravel-ltree
laravel-ltree
LTree Extension (PostgreSQL) for Laravel.
Installation
Run this command to install:
php composer.phar require umbrellio/laravel-ltree
How to use
Implement your Eloquent\Model from LTreeModelInterface and use LTreeModelTrait.
Use LTreeService for build path:
- when create model:
createPath(LTreeModelInterface $model) - when update model:
updatePath(LTreeModelInterface $model)for update path for model and children - when delete model:
dropDescendants(LTreeModelInterface $model)for delete children models
The get() method returns LTreeCollection, instead of the usual Eloquent\Collection.
LTreeCollection has a toTree() method that converts a flat collection to a tree.
LTreeResourceCollection & LTreeResource, which take LTreeCollection as an argument, will also be useful.
Authors
Created by Korben Dallas.
Related Packages
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 8.1.0 | ^8.3| | ^11.0 | MIT | |
| 8.0.1 | ^8.3| | ^11.0 | MIT | |
| 8.0.0 | ^8.3| | ^11.0 | MIT | |
| 7.6.0 | ^7.3| | ^5.8| | MIT | |
| 7.5.2 | ^7.3| | ^5.8| | MIT | |
| 7.5.1 | ^7.3| | ^5.8| | MIT | |
| 7.5.0 | ^7.3| | ^5.8| | MIT | |
| 7.4.4 | ^7.3| | ^5.8| | MIT | |
| 7.4.3 | ^7.3| | ^5.8| | MIT | |
| 7.4.2 | ^7.3| | ^5.8| | MIT | |
| 7.4.1 | ^7.3| | ^5.8| | MIT | |
| 7.4.0 | ^7.3| | ^5.8| | MIT | |
| 7.3.0 | ^7.3| | ^5.8| | MIT | |
| 7.2.3 | ^7.3| | ^5.8| | MIT | |
| 7.2.2 | ^7.3| | ^5.8| | MIT | |
| 7.2.1 | ^7.3| | ^5.8| | MIT | |
| 7.2.0 | ^7.3| | ^5.8| | MIT | |
| 7.1.0 | ^7.3| | ^5.8| | MIT | |
| 7.0.0 | ^7.3| | ^5.8| | MIT | |
| 6.8.4 | ^7.3| | ^5.8| | MIT | |
| 6.8.3 | ^7.3| | ^5.8| | MIT License | |
| 6.8.2 | ^7.3| | ^5.8| | MIT License | |
| 6.8.1 | ^7.3| | ^5.8| | MIT License | |
| 6.7.0 | ^7.3| | ^5.8| | MIT License | |
| 6.6.0 | ^7.3| | ^5.8| | MIT License | |
| 6.5.0 | ^7.3| | ^5.8| | MIT License | |
| 6.4.0 | ^7.3| | ^5.8| | MIT License | |
| 6.3.0 | ^7.3| | ^5.8| | MIT License | |
| 6.2.0 | ^7.3| | ^5.8| | MIT License | |
| 6.1.0 | ^7.3| | ^5.8| |
Showing the latest 30 of 68. See every release on Packagist




