perspikapps/laravel-envribbon

A laravel ribbon to display current environement

v1.0.0 2023-08-08 06:31 UTC

README

Laravel Env Ribbon

Packagist Packagist Packagist

Commitizen friendly semantic-release

Buy me a coffee

This package displays automaticaly a top-left corner ribbon with APP_ENV value & version number on all pages, depending on APP_ENV value & associated config:

capture

Installation

Install via composer

composer require perspikapps/laravel-envribbon

Publish package assets

php artisan vendor:publish --provider="Perspikapps\LaravelEnvRibbon\EnvRibbonServiceProvider"

Usage

Version is handled by avto-dev/app-version-laravel package: fill in VERSION file at project root.

Fill in configuration according to your needs:

return [

    'enabled' => env('APP_RIBBON', true),

    'environments' => [

        'production' => [
            'visible' =>
            env('APP_DEBUG', false),
            'color' => 'limeGreen',
        ],

        'staging' => [
            'visible' => true,
            'color' => 'darkorange',
        ],

        '*' => [
            'visible' => true,
            'color' => 'crimson',
        ]
    ]

];

Security

If you discover any security related issues, please email instead of using the issue tracker.

Credits