Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Plantuml Client Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Available formats

The following formats are supported: png (default), svg, eps, txt, and latex.

Each format has its own class constant in \Jawira\PlantUmlClient\Formats.

You can get all available formats with \Jawira\PlantUmlClient\Formats::ALL.

Customizing PlantUML server

Currently, PlantUML client uses the official server: http://www.plantuml.com/plantuml. You can set your own PlantUML server -for example for privacy purposes.

Set the server on instantiation:

use Jawira\PlantUmlClient\Client;
$client = new Client('http://custom-server.com/plantuml');

Or, set the server after instantiation:

use Jawira\PlantUmlClient\Client;
$client = new Client(); // using default server
$client->setServer('http://custom-server.com/plantuml');

TIP: you can find plenty of open PlantUML servers with a simple search.

Generating image's url

This library only provides the minimum functionality to convert diagrams into images. If you need to do something more fancy (eg. async), you can retrieve the image's url and do it yourself.

Generating the image's url can also be useful for websites, for example.

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();
$url = $client->generateUrl($puml, Format::PNG);

echo "<img src='$url'>";
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle