PHP code example of koassi / filament-rail

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

    

koassi / filament-rail example snippets


use Filament\Support\Colors\Color;
use Koassi\FilamentRail\ThemePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->viteTheme('resources/css/filament/admin/theme.css')
        ->plugins([
            ThemePlugin::make()->accentColor(Color::Indigo),
        ]);
}

ThemePlugin::make()
    ->accentColor(Color::Amber)        // default: Color::Indigo
    ->sidebarWidth('17rem')            // default: 17rem
    ->collapsedSidebarWidth('4.75rem') // default: 4.75rem
    ->collapsedBrandLogo(asset('img/mark.svg')) // default: the brand name's initials
bash
php artisan vendor:publish --tag=filament-rail-css
bash
php artisan vendor:publish --tag=filament-rail-neutral-sidebar-css