承接 ryanxedi/git-info 相关项目开发

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

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

ryanxedi/git-info

最新稳定版本:v1.0.1

Composer 安装命令:

composer require ryanxedi/git-info

包简介

Access your local git branch information

README 文档

README

Git Branch

About gitInfo

gitInfo is a simple tool to retrieve the current branch or hash of your Laravel project:

Getting Started

Pull in the package composer require ryanxedi/git-info

Make this available globally: Add this to the bottom of your aliases array in config/app.php

'gitInfo' => ryanxedi\gitInfo\gitInfo::class,

Usage

To return your current branch

gitInfo::branch()

To return your current branch's hash

gitInfo::hash()

Example

Try this example blade code snippet:

Add the font-awesome CDN to your HTML header section:

<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"  rel="stylesheet" />

Presumably, you don't want this to appear in your production environment.
You can wrap this in an @if() statement in your footer

@if (env('APP_ENV') != 'production')
	<i class="fa-solid fa-code-branch"></i> {{ gitInfo::branch() }}
@endif

Update 'production' to whatever you call your production environment in you .env file

License

gitInfo is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固