PHP code example of intrfce / laravel-environment-banner-bext
1. Go to this page and download the library: Download intrfce/laravel-environment-banner-bext library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
intrfce / laravel-environment-banner-bext example snippets
use Intrfce\LaravelEnvironmentBannerBext\EnvironmentBanner;
$data = app(EnvironmentBanner::class)->toArray();
'colour' => '#f00',
'colour' => [
'production' => '#dc2626',
'staging' => '#f59e0b',
'local' => '#22c55e',
],
'colour' => [
'production' => '#dc2626',
'default' => '#22c55e',
],
'colour' => [
'production' => null,
'default' => '#22c55e',
],
use Intrfce\LaravelEnvironmentBannerBext\EnvironmentBanner;
/**
* Bootstrap any application services.
*/
public function boot(): void
{
EnvironmentBanner::extraData([
'branch' => 'feature/login',
'release' => 'v1.4.2',
]);
}
EnvironmentBanner::extraData([
'queue_size' => (string) $size,
]);
shell
php artisan vendor:publish --tag=environment-banner-config
ini
ENV_WORKTREE_NAME=feature-login