Skip to content

Latest commit

 

History

History
74 lines (54 loc) · 1.44 KB

index.md

File metadata and controls

74 lines (54 loc) · 1.44 KB

Admin bar for filament

Introduction

This package will add an admin bar to the frontend, only visible for logged in Filament users.

img.png

Installation

You can install the package via composer:

composer require codedor/filament-admin-bar

DO NOT forget to publish the CSS files, or the bar will not be visible:

php artisan vendor:publish --force --tag=filament-admin-bar-assets

You can publish the config file with:

php artisan vendor:publish --tag="filament-admin-bar-config"

This is the contents of the published config file:

return [
    'tabs' => [
        Codedor\FilamentAdminBar\Tabs\SeoTab::class,
        Codedor\FilamentAdminBar\Tabs\TranslatableStringsTab::class,
    ],
    'translatable-strings-tab' => [
        'excluded' => [
            'filament-admin-bar::*',
            'routes.*',
        ],
    ],
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-admin-bar-views"

Usage

Load our TranslationLoader in your config/app.php. This way we can show translations in the admin bar.

return [
    // ...
    'providers' => ServiceProvider::defaultProviders()->merge([
        // ...
        Codedor\FilamentAdminBar\TranslationLoader::class,
        // ...
    ])->toArray(),
    // ...
];

After that load the admin bar at the bottom of <body> your layout:

<livewire:admin-bar />

That's all