enniosousa / google-fonts-field-for-backpack
Google Fonts field type for the Backpack for Laravel
Requires
- backpack/crud: ^4.1
Requires (Dev)
- orchestra/testbench: ^4.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-11-06 05:27:48 UTC
README
This package provides a Google Fonts
field type for the Backpack for Laravel administration panel. The Google Fonts field allows admins to choose one or more fonts. All you need it's include the slylesheet link to you website.
Screenshot
Installation
You can install the package via composer:
composer require enniosousa/google-fonts-field-for-backpack
Publish the view
php artisan vendor:publish --provider="Enniosousa\GoogleFontsFieldForBackpack\GoogleFontsFieldForBackpackServiceProvider"
Usage
Dashboard
CRUD::addField([ 'name' => 'subtitleFont', 'label' => "Subtitle Font", 'type' => 'google_fonts', //'options'=> ['Lora', 'Jura', 'Muli:300'], //optional //'allows_multiple'=> true, //optional, default is false //'default' => 'Lora', //optional, it cans be string or array ]);
Frontend
<link href="https://fonts.googleapis.com/css?family=<?= implode('|', array_map('urlencode', (array) $model->subtitleFont)) ?>" rel="stylesheet" type="text/css">
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email ennio@enniosousa.com.br instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.