catap97/laravel-envicon 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

catap97/laravel-envicon

最新稳定版本:v1.0.1

Composer 安装命令:

composer require catap97/laravel-envicon

包简介

Use a different favicon depending on your current runtime environment

README 文档

README

Support Laravel versions Latest Version on Packagist Software License GitHub Workflow Status

This package allows you to display a custom favicon depending on your runtime environment. This makes it easy to identify immediately on which environment you're browsing.

Install

Via Composer

composer require catap97/laravel-envicon

Once the package is installed, you'll need to publish the configuration to link your environments to custom favicons.

php artisan vendor:publish --tag=envicon-config

If you want to use the default envicons provided by this package, run the following command that will copy them in your public/favicons folder.

php artisan vendor:publish --tag=envicon-favicons

Usage

Simply use the provided helper in place of your favicon's URL. This will return the favicon that matches your current runtime environment.

<!doctype html>
<html lang="en">
    <head>
        <link rel="icon" href="{{ Envicon::url() }}">
    </head>
</html>

If you need the URL of a favicon for a specific environment, use the following statement instead. You'll need to pass the environment's name as the first parameter.

<!doctype html>
<html lang="en">
    <head>
        <link rel="icon" href="{{ Envicon::for('production') }}">
    </head>
</html>

Testing

Tests can be run using the following composer script.

composer test

License

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

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-11