matthewhallcom/blade-mls-icons

A package to make use of MLS Logos in your Laravel Blade views.

1.0.9 2024-02-02 22:54 UTC

This package is auto-updated.

Last update: 2024-05-01 00:17:39 UTC


README

A package to easily make use of MLS logos in your Laravel Blade views.

For a full list of available icons see the SVG directory.

Requirements

  • PHP 8.2 or higher
  • Laravel 10.0 or higher

Installation

composer require matthewhallcom/blade-mls-icons

MLS Icons

Blade MLS Icons uses official MLS logos.

Configuration

Blade MLS Icons also offers the ability to use features from Blade Icons like default classes, default attributes, etc. If you'd like to configure these, publish the blade-mls-icons.php config file:

php artisan vendor:publish --tag=blade-mls-icons-config

Usage

Icons can be used as self-closing Blade components which will be compiled to SVG icons:

<x-mls-vancouver-whitecaps/>

You can also pass classes to your icon components:

<x-mls-vancouver-whitecaps class="w-6 h-6 text-gray-500"/>

And even use inline styles:

<x-mls-vancouver-whitecaps style="color: #555"/>

The solid icons can be referenced like this:

<x-mls-vancouver-whitecaps/>

Raw SVG Icons

If you want to use the raw SVG icons as assets, you can publish them using:

php artisan vendor:publish --tag=blade-mls-icons --force

Then use them in your views like:

<img src="{{ asset('vendor/blade-mls-icons/vancouver-whitecaps.svg') }}" width="10" height="10"/>

Maintainers

Blade mlsicons is developed and maintained by Matthew Hall.

License

Blade mlsicons is open-sourced software licensed under the MIT license.