PHPackages                             zero-to-prod/laravel-svg - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. zero-to-prod/laravel-svg

ActiveLibrary

zero-to-prod/laravel-svg
========================

Serve your svg files from an endpoint.

v1.1.0(8mo ago)123MITPHPPHP &gt;=8.1.0CI passing

Since Dec 4Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/zero-to-prod/laravel-svg)[ Packagist](https://packagist.org/packages/zero-to-prod/laravel-svg)[ Docs](https://github.com/zero-to-prod/laravel-svg)[ GitHub Sponsors](https://github.com/zero-to-prod)[ RSS](/packages/zero-to-prod-laravel-svg/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (16)Used By (0)

Zerotoprod\\LaravelSvg
======================

[](#zerotoprodlaravelsvg)

[![](art/logo.png)](art/logo.png)

[![Repo](https://camo.githubusercontent.com/9a90a3efeee26aed7d7f2feee9cd84566a26f9c362cc773b184d076210906e1c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6769746875622d677261793f6c6f676f3d676974687562)](https://github.com/zero-to-prod/laravel-svg)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/38953cac5ff9a8abc6fa758511d3ce90f5ba7bce794134295490d7a79f9de45b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a65726f2d746f2d70726f642f6c61726176656c2d7376672f746573742e796d6c3f6c6162656c3d74657374)](https://github.com/zero-to-prod/laravel-svg/actions)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/66c931a8a2a6872e11f3cfb6450cc9aa959dcb3c8a916039ea5aeebd8bf7693a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a65726f2d746f2d70726f642f6c61726176656c2d7376672f6261636b77617264735f636f6d7061746962696c6974792e796d6c3f6c6162656c3d6261636b77617264735f636f6d7061746962696c697479)](https://github.com/zero-to-prod/laravel-svg/actions)[![Packagist Downloads](https://camo.githubusercontent.com/c8742ca4d95db01a7906b190c53aa7dbeee9f8d8816af1710aa6e6bf1ac8cfe8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a65726f2d746f2d70726f642f6c61726176656c2d7376673f636f6c6f723d626c7565)](https://packagist.org/packages/zero-to-prod/laravel-svg/stats)[![php](https://camo.githubusercontent.com/75bb1b774d823de5df0e57acfab7cffa18a7215be19f1dc62f7e5e838dbb335d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7a65726f2d746f2d70726f642f6c61726176656c2d7376672e7376673f636f6c6f723d707572706c65)](https://packagist.org/packages/zero-to-prod/laravel-svg/stats)[![Packagist Version](https://camo.githubusercontent.com/1fd2b94bdc83d24c72cf9d58dd47280da84400b3971ea4196bb41c45e98c6d02/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a65726f2d746f2d70726f642f6c61726176656c2d7376673f636f6c6f723d663238643161)](https://packagist.org/packages/zero-to-prod/laravel-svg)[![License](https://camo.githubusercontent.com/9a73da7f0d48cdbaf3a784f7ce71db482140159cf27c33fb954eb9b1371356a9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7a65726f2d746f2d70726f642f6c61726176656c2d7376673f636f6c6f723d70696e6b)](https://github.com/zero-to-prod/laravel-svg/blob/main/LICENSE.md)[![wakatime](https://camo.githubusercontent.com/34f748cfd99bb2edd214d49b4374ee8487bfce0f5c3d5e14feeb524c41da0de3/68747470733a2f2f77616b6174696d652e636f6d2f62616467652f6769746875622f7a65726f2d746f2d70726f642f6c61726176656c2d7376672e737667)](https://wakatime.com/badge/github/zero-to-prod/laravel-svg)[![Hits-of-Code](https://camo.githubusercontent.com/7bff3264e1378d581359173613e9441e86aa48c1647b5aaed881a2de9cf1ec79/68747470733a2f2f686974736f66636f64652e636f6d2f6769746875622f7a65726f2d746f2d70726f642f6c61726176656c2d7376673f6272616e63683d6d61696e266c6162656c3d486974732d6f662d436f6465)](https://hitsofcode.com/github/zero-to-prod/laravel-svg/view?branch=main&label=Hits-of-Code)

Contents
--------

[](#contents)

- [Introduction](#introduction)
- [Requirements](#requirements)
- [Installation](#installation)
- [Documentation Publishing](#documentation-publishing)
    - [Automatic Documentation Publishing](#automatic-documentation-publishing)
- [Publish Vendor Files](#publish-vendor-files)
- [Usage](#usage)
- [Local Development](./LOCAL_DEVELOPMENT.md)
- [Contributing](#contributing)

Introduction
------------

[](#introduction)

Serve your svg files from an endpoint.

Requirements
------------

[](#requirements)

- PHP 8.1 or higher.

Installation
------------

[](#installation)

Install `Zerotoprod\JsonSchema4` via [Composer](https://getcomposer.org/):

```
composer require zero-to-prod/laravel-svg
```

This will add the package to your project's dependencies and create an autoloader entry for it.

Documentation Publishing
------------------------

[](#documentation-publishing)

You can publish this README to your local documentation directory.

This can be useful for providing documentation for AI agents.

This can be done using the included script:

```
# Publish to default location (./docs/zero-to-prod/laravel-svg)
vendor/bin/zero-to-prod-laravel-svg

# Publish to custom directory
vendor/bin/zero-to-prod-laravel-svg /path/to/your/docs
```

### Automatic Documentation Publishing

[](#automatic-documentation-publishing)

You can automatically publish documentation by adding the following to your `composer.json`:

```
{
    "scripts": {
        "post-install-cmd": [
            "zero-to-prod-laravel-svg"
        ],
        "post-update-cmd": [
            "zero-to-prod-laravel-svg"
        ]
    }
}
```

Publish Vendor Files
--------------------

[](#publish-vendor-files)

```
php artisan vendor:publish --tag=laravel-svg-config
php artisan vendor:publish --tag=laravel-svg-views
```

Usage
-----

[](#usage)

Create blade files under `resources/views/laravel_svg/svg`.

```

```

Use the component like this:

```

```

Configuration
-------------

[](#configuration)

```
return [
    'endpoint' => '/svg/{name}',
    'route_name' => 'svg',
    'view' => 'laravel_svg.svg',
    'svg_path' => 'laravel_svg.svg',
    'view_namespace' => 'svg',
    'component_prefix' => 'svg',
    'middleware' => null,
    'view_component' => \Zerotoprod\LaravelSvg\Svg::class,
    'controller' => \Zerotoprod\LaravelSvg\SvgController::class
];
```

Contributing
------------

[](#contributing)

Contributions, issues, and feature requests are welcome! Feel free to check the [issues](https://github.com/zero-to-prod/json-schema4/issues) page if you want to contribute.

1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Commit changes (`git commit -m 'Add some feature'`).
4. Push to the branch (`git push origin feature-branch`).
5. Create a new Pull Request.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance60

Regular maintenance activity

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~19 days

Recently: every ~60 days

Total

15

Last Release

253d ago

Major Versions

v0.1.12 → v1.0.02025-02-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/502649f05d36c87d494988bd99193a4d908d345335d99c080928a726277371f5?d=identicon)[zero-to-prod](/maintainers/zero-to-prod)

---

Top Contributors

[![zero-to-prod](https://avatars.githubusercontent.com/u/61474950?v=4)](https://github.com/zero-to-prod "zero-to-prod (9 commits)")

---

Tags

componentlaravelphpsvgzero-to-prodlaravel-svg

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zero-to-prod-laravel-svg/health.svg)

```
[![Health](https://phpackages.com/badges/zero-to-prod-laravel-svg/health.svg)](https://phpackages.com/packages/zero-to-prod-laravel-svg)
```

###  Alternatives

[zero-to-prod/data-model

Transforms Data into Type-Safe DTOs.

14226.2k32](/packages/zero-to-prod-data-model)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
