migda/laravel-nestedset-visualisation

This package allows to visually preview your nestedset graph.

1.0.1 2021-09-16 20:09 UTC

This package is auto-updated.

Last update: 2024-10-17 03:13:52 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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

test

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.