jawira/plantuml-client
Laravel-friendly PHP client for PlantUML servers. Generate UML diagrams from text in your apps, with simple API calls, server URL configuration, and easy integration into projects needing rendered class, sequence, and other diagrams.
composer require jawira/plantuml-client
Four methods are exposed:
use Jawira\PlantUmlClient\Client;
use Jawira\PlantUmlClient\Format;
$puml = <<<PLANTUML
[@startuml](https://github.com/startuml)
Bob -> Alice : hello
[@enduml](https://github.com/enduml)
PLANTUML;
$client = new Client();
$svg = $client->generateImage($puml, Format::SVG);
use Jawira\PlantUmlClient\Client;
use Jawira\PlantUmlClient\Format;
$puml = file_get_contents('path/to/my-diagram.puml'); // load png file
$client = new Client();
$png = $client->generateImage($puml, Format::PNG);
file_put_contents('path/to/my-diagram.png', $png); // save png to disk
How can I help you explore Laravel packages today?