Skip to content

Installation ​

1. Install via Composer

php
composer require dp0/filament-sanchaya

2. Run the Interactive Installer

php
php artisan sanchaya:install

The installer will prompt you to:

  • Publish config/filament-sanchaya.php
  • Publish and run migrations
  • Choose your default storage disk

3. Filament Custom Theme Requirement

Required - not optional

Sanchaya uses custom styling and Tailwind CSS utility classes. Without a custom Filament theme, components and colors will not render correctly.

If you do not have a custom theme configured for your Filament panel, generate one:

php
php artisan make:filament-theme

Add the package's views directory to your custom theme's main CSS file (usually resources/css/filament/admin/theme.css) using the @source directive. Adjust the relative path if your theme is in another directory:

php
@source "../../../../vendor/dp0/filament-sanchaya/resources/views";

Then make sure your panel actually uses that theme by pointing viteTheme() at it in your panel provider - otherwise your theme (and the package styles) will never be loaded:

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

Finally, compile your assets using your asset bundler:

php
npm run dev # or npm run build

Manual Publishing

php
php artisan vendor:publish --tag=sanchaya-config
php artisan vendor:publish --tag=sanchaya-migrations
php artisan vendor:publish --tag=sanchaya-views
php artisan migrate

Released under the MIT License.