Generate mermaid.js flowcharts with php.
You can install the package via composer:
composer require jonaspardon/mermaid-php
$graph = new Graph(new GraphDirection(GraphDirection::LEFT_TO_RIGHT));
$from = new Node(
identifier: 'A',
title: 'This package',
shape: new NodeShape(NodeShape::ROUND_EDGES),
style: new Style(
backgroundColor: '#16a085',
fontColor: '#ffffff',
borderColor: '#333333',
),
);
$to = new Node(
identifier: 'B',
title: 'Your application',
shape: new NodeShape(NodeShape::HEXAGON),
style: new Style(
backgroundColor: '#55efc4',
fontColor: '#000',
borderColor: '#333333',
),
);
$link = new Link($from, $to);
$output = $graph->addNode($from)
->addNode($to)
->addLink($link)
->render();
flowchart LR;
A("This package");
style A fill:#16a085,stroke:#333333,stroke-width:1px,color:#ffffff;
B{{"Your application"}};
style B fill:#55efc4,stroke:#333333,stroke-width:1px,color:#000;
A-->B;
flowchart LR;
A("This package");
style A fill:#16a085,stroke:#333333,stroke-width:1px,color:#ffffff;
B{{"Your application"}};
style B fill:#55efc4,stroke:#333333,stroke-width:1px,color:#000;
A-->B;
composer test
- Laravel Event Visualizer - a Laravel package to visualize your application's events and handlers
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.