承接 magarrent/laravel-favicon-generator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

magarrent/laravel-favicon-generator

最新稳定版本:1.0.0

Composer 安装命令:

composer require magarrent/laravel-favicon-generator

包简介

Generate and render favicons from Images

README 文档

README

Latest Version on Packagist

Installation

Requires PHP Imagick

You can install the package via composer:

composer require magarrent/favicon-generator

Usage

To use your own image and convert it to the different favicons versions, use these methods. This will generate a "favicon" folder to your public_path with the different favicons formats and versions. Will also generate some XML and webmanifest according to the web standards.

Use this methods in your own scenario, when you upload the image, or just a console command, whatever. Just write your input path and optionally the public output path. If you don't specify the output (2nd param), the favicons will be saved in public/favicons

$favicon = new FaviconGenerator('path-to-your-image', 'optional-public-dist-path');
$favicon->generateFaviconsFromImagePath();

Once you generated the icons, just write these line into your <head> section of your HTML

{!! \Magarrent\FaviconGenerator\FaviconGenerator::generateHtmlMetaIcons() !!}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Roadmap

  • Tests
  • Generate icons from Image class, not from String path

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 721
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 19
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-28