Skip to content

esign/laravel-environment-badge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Display a warning badge for certain app environments

Latest Version on Packagist Total Downloads GitHub Actions

Display a badge for testing or staging environments. This package is Esign-branded, feel free to fork and change it to fit your own needs.

Installation

You can install the package via composer:

composer require esign/laravel-environment-badge

The package will automatically register a service provider.

Next up, you can optionally publish the configuration and language files:

php artisan vendor:publish --provider="Esign\EnvironmentBadge\EnvironmentBadgeServiceProvider" --tag="config"
php artisan vendor:publish --provider="Esign\EnvironmentBadge\EnvironmentBadgeServiceProvider" --tag="lang"

Usage

To display the environment badge you may use the view component that ships with this package:

<x-environment-badge />

To enable this badge for certain environments you may set the ENVIRONMENT_BADGE_ENABLED environment variable to true:

ENVIRONMENT_BADGE_ENABLED=true

Testing

composer test

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published