bezhanSalleh / filament-panel-switch

The Panel Switch Plugin for Filament offers a robust and customizable component for switching between panels in applications built with FilamentPHP.
MIT License
123 stars 21 forks source link

Add possibility to define panels labels #1

Closed lucasgiovanny closed 1 year ago

lucasgiovanny commented 1 year ago

This pull request makes it easier to label panels by letting you use an array of panel_id => label pairs. This way, you can pick any label you prefer and even use translations if needed. It's a user-friendly improvement that adds more flexibility to working with panels.

e.g.

PanelSwitch::configureUsing(function (PanelSwitch $panelSwitch) {
    $panelSwitch->renderHook('panels::global-search.before')
        ->labels([
             'admin' => 'Custom Label',
             'customer' => __('Cliente'),
        ]);
    });
bezhanSalleh commented 1 year ago

Thanks.