migda / laravel-nestedset-visualisation
This package allows to visually preview your nestedset graph.
Requires
- php: ^7.3 | ^8.0
- illuminate/contracts: ^8.37
- kalnoy/nestedset: ^6.0
Requires (Dev)
- nunomaduro/collision: ^5.3
- orchestra/testbench: ^6.15
- pestphp/pest: ^1.18
- pestphp/pest-plugin-laravel: ^1.1
- spatie/laravel-ray: ^1.23
- vimeo/psalm: ^4.8
README
Extension for Laravel Nestedset.
Installation
You can install the package via composer:
composer require migda/laravel-nestedset-visualisation
Usage
An artisan command for generating an image of a given graph is included.
It accepts the fully qualified name of the model as an argument, eg. App\Models\Category
If you want to run this command, you need to have installed dot - Part of graphviz package (http://www.graphviz.org/).
php artisan laravel-nestedset:visualize {model? : Nestedset model} {property? : model property as node label} {--output=./graph.jpg} {--format=jpg} {--direction=TB} {--dot-path=/usr/local/bin/dot}
Example:
php artisan laravel-nestedset:visualize "\App\Models\Category" name --output=categories_graph.jpg --format=jpg --direction=LR
or just:
php artisan laravel-nestedset:visualize
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
Inspired by
Winzou State Machine service provider for Laravel
License
The MIT License (MIT). Please see License File for more information.