Download the PHP package jerodev/laravel-font-awesome without Composer

On this page you can find all versions of the php package jerodev/laravel-font-awesome. 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-font-awesome

:bangbang: This package is no longer maintained.
I recommend switching to https://github.com/blade-ui-kit/blade-icons

Font Awesome Blade directives for Laravel

Latest Stable Version License Travis (.com) StyleCI Scrutinizer code quality (GitHub/Bitbucket)

This package will render font awesome icons in your views on the server side. This removes the need to add extra JavaScript or webfont resources on the client side and in doing so reduces the size of your website significantly.

This is achieved by replacing the icons with their svg counterpart before sending the response to the client.

Requirements

Requirement Version
PHP >= 7.2
Laravel 6.x

Laravel 5.x

For Laravel 5.6 and up, use version v1.x of this package

Installation

Install the package using Composer.

composer require jerodev/laravel-font-awesome

Service Provider

The package will be auto-discovered by Laravel. If you disabled auto-discovery, you should add the following provider to your config/app.php file.

\Jerodev\LaraFontAwesome\FontAwesomeServiceProvider::class,

Usage

Middleware

:warning: Since version 2.0, the middleware is no longer automatically injected. You will have to add this to the routes where needed.

This package includes a middleware, InjectStyleSheet, that injects a minimal stylesheet into your views on render.

The middleware can be added to your routes as documented by Laravel:

Views

To use Font Awesome icons in your view there are a few new blade directives.

When using the @fa() directive. The package will scan the different Font Awesome libraries and use the first library where it finds the icon.

The order in which the libraries are scanned is regular, brands, solid. But this can be modified in the configuration.

Parameters

The @fa() function can take three parameters of which only the first is required.

Parameter Type Description
name string The name of the icon
css_class string Extra css classes to be appended to the svg output
force_svg_href bool Force the output to be an svg href link if possible. Can be useful in loops.

Configuration

The package contains a few configuration options that can be modified by first publishing the config file using the command below. This will create a fontawesome.php file in your config folder.

php artisan vendor:publish --provider="Jerodev\LaraFontAwesome\FontAwesomeServiceProvider"
Key Type Default value Description
libraries string[] ['regular', 'brands', 'solid'] The icon libraries that will be available. This is also the order in which the libraries will be searched for icons.
svg_href bool true Use svg href links for consecutive icons.

All versions of laravel-font-awesome with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version 6.x
fortawesome/font-awesome Version ^5.12
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 jerodev/laravel-font-awesome contains the following files

Loading the files please wait ....