PHPackages                             qaslan/icons - 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. [Templating &amp; Views](/categories/templating)
4. /
5. qaslan/icons

ActiveLibrary[Templating &amp; Views](/categories/templating)

qaslan/icons
============

An easy way inline SVG images in your Blade templates.

1.0.0(3y ago)0747MITPHP

Since Feb 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/swarakaka/blade-icons)[ Packagist](https://packagist.org/packages/qaslan/icons)[ RSS](/packages/qaslan-icons/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Inline SVG Icons For Laravel Blade
==================================

[](#inline-svg-icons-for-laravel-blade)

[![](https://github.com/swarakaka/blade-icons/workflows/Tests/badge.svg)](https://github.com/swarakaka/blade-icons/actions)

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

[](#introduction)

This is a package for the Laravel framework that allows you to use the Blade component to insert inline SVG images.

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

[](#installation)

Run this at the command line:

```
$ composer require qaslan/blade-icons
```

This will update `composer.json` and install the package into the `vendor/` directory.

Base Usage
----------

[](#base-usage)

Register a directory with your files in the service provider:

```
namespace App\Providers;

use Qaslan\Icons\IconFinder;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function boot(IconFinder $iconFinder) : void
    {
        $iconFinder->registerIconDirectory('fa', storage_path('app/fontawesome'));
    }
}
```

When calling the directory method with the first argument, we pass the prefix to call our icons and the second directory where they are located.

After that, we can call the component in our blade templates:

```

```

If you use one or two sets of icons that do not repeat, then it is not necessary to specify a prefix in the component:

```

```

You can also list some attributes that should be applied to your icon:

```

```

### Default Sizes

[](#default-sizes)

If you are using icons from the same set, it makes sense to specify a default size value:

```
namespace App\Providers;

use Qaslan\Icons\IconFinder;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function boot(IconFinder $iconFinder) : void
    {
        $iconFinder
            ->registerIconDirectory('fa', storage_path('app/fontawesome'))
            ->setSize('54px', '54px');
    }
}
```

If you use different sets, for example, in the public part of the application and in the admin panel, then you can dynamically change the value in the middleware:

```
namespace App\Http\Middleware;

use Closure;
use Qaslan\Icons\IconFinder;

class ExampleMiddleware
{
    /**
     * @var \Qaslan\Icons\IconFinder
     */
    protected $iconFinder;

    /**
     * ExampleMiddleware constructor.
     *
     * @param IconFinder $iconFinder
     */
    public function __construct(IconFinder $iconFinder)
    {
        $this->iconFinder = $iconFinder;
    }

    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        $iconFinder->setSize('54px', '54px');

        return $next($request);
    }
}
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](license.md) for more information.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.9% 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

Unknown

Total

1

Last Release

1231d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2155a73d503ba4d4d671b98d82173ac366aa744427281a2bf7eb5a7b4b610990?d=identicon)[swara-mohammed](/maintainers/swara-mohammed)

---

Top Contributors

[![tabuna](https://avatars.githubusercontent.com/u/5102591?v=4)](https://github.com/tabuna "tabuna (34 commits)")[![swarakaka](https://avatars.githubusercontent.com/u/9349190?v=4)](https://github.com/swarakaka "swarakaka (10 commits)")[![G3z](https://avatars.githubusercontent.com/u/875086?v=4)](https://github.com/G3z "G3z (1 commits)")[![PSalador](https://avatars.githubusercontent.com/u/29531264?v=4)](https://github.com/PSalador "PSalador (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/qaslan-icons/health.svg)

```
[![Health](https://phpackages.com/badges/qaslan-icons/health.svg)](https://phpackages.com/packages/qaslan-icons)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)

PHPackages © 2026

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