Skip to content
A small Laravel package to load in Google Fonts.
Branch: master
Clone or download
Latest commit e4a08fd May 26, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
config init May 26, 2019
src init May 26, 2019
.styleci.yml init May 26, 2019 init May 26, 2019
composer.json Fixed licence typo May 26, 2019 init May 26, 2019
phpunit.xml init May 26, 2019 init May 26, 2019

Google Fonts Loader

A small Laravel package to load google fonts into your application.


1 - Dependency

The first step is using composer to install the package and automatically update your composer.json file, you can do this by running:

composer require rossmcneil/googlefontsloader

Note: If you are using Laravel 5.5, the steps 2 and 3, for providers and aliases, are unnecessaries. GoogleFontsLoader supports Laravel new Package Discovery.

2 - Provider

You need to update your application configuration in order to register the package so it can be loaded by Laravel, just update your config/app.php file adding the following code at the end of your 'providers' section:


// file START ommited
    'providers' => [
        // other providers ommited
// file END ommited

3 - Facade

In order to use the GoogleFontsLoader facade, you need to register it on the config/app.php file, you can do that the following way:

// file START ommited
    'aliases' => [
        'GoogleFontsLoader' => RossMcNeil\GoogleFontsLoader\Facades\GoogleFontsLoader::class,
// file END ommited

4 Configuration

Publish config

In your terminal type

php artisan vendor:publish


php artisan vendor:publish --provider="RossMcNeil\GoogleFontsLoader\Providers\GoogleFontsLoaderServiceProvider"

In googlefontsloader.php configuration file you can determine the properties of the default values and some behaviors.



  • Is an array of fonts you wish to load in. display
  • Is the value used for the font-display setting.


In Your View

	{!! GoogleFontsLoader::load() !!}

    <!-- You may also pass the fonts into the load method as an array. This will override the config settings. -->
	{!! GoogleFontsLoader::load([
        'Open Sans:400,700'
    ]) !!}


Change log

Please see the changelog for more information on what has changed recently.


Please see for details and a todolist.


If you discover any security related issues, please email instead of using the issue tracker.



Please see the license file for more information.

You can’t perform that action at this time.