1. Go to this page and download the library: Download atelier/diagram library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$diagram = Diagram::fromMermaid($source); // throws on anything unsupported
$maybe = Diagram::tryFromMermaid($source); // null instead of an exception
$diagram = Diagram::fromMermaid($source);
$diagram->toSvg(); // a string of SVG markup
$diagram->saveSvg($path); // the same, written to a file
$diagram->toMermaid(); // canonical Mermaid, back from the model
$diagram->toMarkdown(); // a fenced Mermaid block, for a README
use Atelier\Diagram\Theme\Theme;
$diagram->toSvg(Theme::dark());
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.