DEV Community

Cover image for Filament has SPA mode!
Mitesh Rathod
Mitesh Rathod

Posted on

Filament has SPA mode!

Did you know, with Filament you can enable SPA mode for your panel.

You need to add ->spa() in your PanelProvider.

<?php

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ->default()
            ->id('admin')
            ->spa()
            // ...
    }
}

Enter fullscreen mode Exit fullscreen mode

In SPA mode, you visit the any page, Filament will cache the assets. So next time when you visit the page asset will load from the cache.

and there you go!..

Top comments (1)

Collapse
 
almanza023 profile image
Eduardo Antonio Almanza Pérez

Excelente