https://github.com/technicalguru/php-font-awesome
Provides Free Font Awesome for PHP apps
https://github.com/technicalguru/php-font-awesome
List: php-font-awesome
Last synced: about 2 months ago
JSON representation
Provides Free Font Awesome for PHP apps
- Host: GitHub
- URL: https://github.com/technicalguru/php-font-awesome
- Owner: technicalguru
- License: lgpl-3.0
- Created: 2020-11-13T07:23:20.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-10-30T10:02:16.000Z (over 3 years ago)
- Last Synced: 2025-11-17T12:27:26.992Z (7 months ago)
- Language: PHP
- Size: 4.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# php-font-awesome
Provides Free Font Awesome icons for PHP apps.
# License
This project is licensed under [GNU LGPL 3.0](LICENSE.md).
# Installation
## By Composer
```
composer install technicalguru/font-awesome
```
## By Package Download
You can download the source code packages from [GitHub Release Page](https://github.com/technicalguru/php-font-awesome/releases)
# How to use
## Get the provided version number
```
$version = \TgFontAwesome\FontAwesome::getVersion();
```
## Get the URI of a font library
The following method will give you URIs for your further inspection:
```
use TgFontAwesome\FontAwesome;
// Get URI to all icons library, as minified CSS
$uri = FontAwesome::getUri();
// Get URI to all icons library, as uncompressed CSS
$uri = FontAwesome::getUri('all');
// Get URI to all icons library, as minified Javascript
$uri = FontAwesome::getUri('all.min', FontAwesome::JS);
```
You can get the correct HTML script tag to be included in your HTML output in the same way:
```
use TgFontAwesome\FontAwesome;
// Get stylesheet tag to all icons library, as minified CSS
$tag = FontAwesome::getLink();
// Get stylesheet tag to all icons library, as uncompressed CSS
$tag = FontAwesome::getLink('all');
// Get tag to all icons library, as minified Javascript
$tag = FontAwesome::getLink('all.min', FontAwesome::JS);
```
All methods will throw an `FontAwesomeException` when you ask for a non-existing library.
# Contribution
Report a bug, request an enhancement or pull request at the [GitHub Issue Tracker](https://github.com/technicalguru/php-font-awesome/issues).