Download the PHP package icehouse-ventures/laravel-mermaid without Composer

On this page you can find all versions of the php package icehouse-ventures/laravel-mermaid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-mermaid

laravel-mermaid

Simple Mermaid diagrams for Laravel applications. Laravel Mermaid generates flowcharts, user journeys, entity relationship diagrams, business process diagrams, mind maps, and the other diagram types supported by Mermaid 11.

The current release supports PHP 8.2+ and Laravel 12 or 13.

Mermaid Diagrams

Mermaid is a diagramming and charting library with a Markdown-like syntax for generating data visualisations. Mermaid diagrams are also supported in GitHub Markdown and Notion, making the syntax familiar to many users.

You can find out more in the Mermaid documentation.

Installation

You can install the package via composer:

Quickstart: Blade Component Slot

The package provides a Blade component that you can use to generate Mermaid diagrams in your views. Here is an example of how you can use the Blade component to generate a simple flowchart diagram. The component can be wrapped around any standard Mermaid diagram string (similar to Markdown strings).

Passing Mermaid syntax to the Blade component

You can pass a Mermaid diagram string directly to the component using the data attribute.

Passing an Array to the Blade Component

Laravel and PHP provide convenient helpers for working with arrays. The builder converts an array of Mermaid statements into a diagram string:

Passing in an Eloquent Collection

You can also pass in an Eloquent collection to the Blade component. This allows you to visualise complex business data and relationships straight from your Eloquent models and their relationships. The package will automatically convert the collection to an array of strings that represent the Mermaid diagram using the Generate Diagram From Collection method. Here is an example of how you can pass an Eloquent collection to the Blade component:

Custom collections, models and relationships

You can also pass in custom collections, models and relationships to the Blade component by flattening the data into an array, then using the array method in the package to generate the diagram. This method is useful if you want more complex dynamic data such as links or custom formatting.

Configuration

You can customize the Mermaid configuration by publishing the mermaid.php config file and changing the settings as needed. You can publish the configuration file using the following command:

This creates config/mermaid.php. Set theme to default, forest, dark, neutral, base, or custom.

By default the package uses its Tailwind-inspired custom theme. When theme is custom, select bootstrap, tailwind, or darkmode with themeFile.

The bundled browser runtime is pinned to Mermaid major version 11:

You can replace cdn with an exact version, a self-hosted asset, or an approved internal CDN. Keep securityLevel set to strict unless every diagram and HTML label is trusted.

Canvas Style

You can also set the canvas style for the Mermaid diagram by passing in a class to the Blade component. This allows you to style the diagram using your own CSS.

Livewire

This package includes a Livewire-compatible component that re-renders a diagram when a component property changes. The current release and demo application are tested with Livewire 4. In this example, increasing the limit loads more users into the diagram.

Background

Icehouse Ventures created this package for dynamic diagrams in Laravel and now maintains it with its community of contributors.

Contributing

Contributions from first-time and returning contributors are welcome. Bug reproductions, new diagram examples, documentation fixes, tests, accessibility improvements, and compatibility updates are all useful. Open an issue for a design discussion or send a focused pull request for a well-understood change.

Development

composer check runs Pint, PHPStan and the Pest test suite. GitHub Actions exercises Laravel 12–13 across PHP 8.2–8.5.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-mermaid with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/database Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
illuminate/view Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package icehouse-ventures/laravel-mermaid contains the following files

Loading the files please wait ...