Download the PHP package adrianmomorales/blade-svg-sage9-php8 without Composer

On this page you can find all versions of the php package adrianmomorales/blade-svg-sage9-php8. 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 blade-svg-sage9-php8

Blade SVG

Easily inline SVG images in your Blade templates. This Packages Is Clone from https://github.com/adamwathan/blade-svg

Installation

You can install this package via Composer by running this command in your terminal in the root of your project:

composer require willyw2k/blade-svg

Getting started

The package's service provider will automatically register itself.

Publish the Blade SVG config file:

Configuration

Inside config/blade-svg.php, you can specify any default CSS classes you'd like to be applied to your SVG images using the class option:

You can specify multiple classes by separating them with a space, just like you would in an HTML class attribute:

Basic usage

To insert an SVG in your template, simply use the @svg Blade directive, passing the name of the SVG and optionally any additional classes:

To add additional attributes to the rendered SVG tag, pass an associative array as the third parameter:

If you have attributes to declare but no additional class, you can pass an associative array as the second parameter instead:

If you'd like to override the default class name, specify a class in the attributes array:

If you'd like to add an attribute that needs no value, just specify it without a key:

If you'd like, you can use the svg_image helper directly to expose a fluent syntax for setting SVG attributes:

Using a spritesheet

I recommend just rendering icons inline because it's really simple, has a few advantages over spritesheets, and has no real disadvantages, but if you really want to use a spritesheet, who am I to stop you?

So if you'd rather use a sprite sheet instead of rendering your SVGs inline, start by configuring the path to your spritesheet in the blade-svg config file:

If the ID attributes of the SVGs in your spritesheet have a prefix, you can configure that using the sprite_prefix option:

Next, set the inline option to false which will tell Blade SVG to render icons using the spritesheet by default instead of inlining the entire SVG:

Make sure you render the hidden sprite sheet somewhere at the end of any layouts that use SVGs by using the svg_spritesheet() helper:

You can force an SVG to reference the sprite sheet even if you are rendering inline by default by using the fluent syntax and chaining the sprite method:

Similarly, you can force an SVG to render inline even if you are using sprites by default by chaining the inline method:


All versions of blade-svg-sage9-php8 with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^5.3|^6.0|^7.0|^8.0
illuminate/filesystem Version ^5.3|^6.0|^7.0|^8.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 adrianmomorales/blade-svg-sage9-php8 contains the following files

Loading the files please wait ...