PHP code example of chrisreedio / filament-breakpoint-badge

1. Go to this page and download the library: Download chrisreedio/filament-breakpoint-badge 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/ */

    

chrisreedio / filament-breakpoint-badge example snippets


use ChrisReedIO\BreakpointBadge\BreakpointBadgePlugin;

$panel
    ->plugins([
        BreakpointBadgePlugin::make(),
    ]);

use ChrisReedIO\BreakpointBadge\BreakpointBadgePlugin;

$panel->plugins([
    BreakpointBadgePlugin::make()
        ->visible(fn () => auth()->user()?->can('see_breakpoints'))
]);

use pxlrbt\FilamentEnvironmentBadge\EnvironmentBadgePlugin;
use Filament\Support\Colors\Color;

$panel->plugins([
    BreakpointBadgePlugin::make()
        ->color(fn () => match (app()->environment()) {
            'production' => null,
            'staging' => Color::Orange,
            default => Color::Blue,
        })
]);