Hotwire Turbo
Has anyone got this working with the admin panel?
There is a "trick" provided by Tina Hammar here:
https://filamentphp.com/tricks/turbolinks-admin
However, it's outdated now since Laravel 10 (which now uses Vite etc.).
It'd be great to use this to get an SPA feel with the admin panel links in the navbar etc.
Manny thanks.
Filament
Admin panel Turbolinks by Tina Hammar - Tricks - Filament
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.
20 Replies
Hi @benshawuk, I'm not using Turbo with Filament, but I am using it on other types of projects. All the info in the tutorial still makes sense (after a quick look, I'll admit). Have you already found the upgrade guide for Mix -> Vite?
https://github.com/laravel/vite-plugin/blob/main/UPGRADE.md#migrating-from-laravel-mix-to-vite
Maybe this can be useful if you want to try updating the article
Thanks @pboivin . There's a lot to digest there, but I'll certainly check it out! If I get it working, I might write a blog post dissecting it.
would love to see a more updated guide and even just a simple POC repo with it working. Right now that existing tricks post is super outdated with references to items that do no even exist anymore in filament. I think turbo can fill a need until livewire 3 is out, but needs better support at the moment.
Did you read the comments? There’s one about using it with vite.
Yes, I didn't have any luck getting that working.
I will try again and post back with solutions once I do.
I’ll give it a go too. Shouldn’t be too difficult though. Vite vs Webpack. They ultimately do the same thing.
As @mark_chaney pointed out, some of the filament code is now superseded also. There's a fair bit to unpack since the article, I think.
But the Vite vs webpack part isn’t relevant it’s about the order of the scripts being loaded.
One of my applications has it working well: https://github.com/andrewdwallo/erpsaas
I dont think the hotwire stimulus part is needed though. I would just do the turbo part.
GitHub
GitHub - andrewdwallo/erpsaas
Contribute to andrewdwallo/erpsaas development by creating an account on GitHub.
Thanks, @andrewwallo Looks like an interesting project.
How does Turbo deal with server side redirects? I’m assuming that will still trigger a full page reload?
Hi @benshawuk I try this turbo and It's working fine in Laravel 10
"laravel/framework": "^10.10",
Base on your comment in the Trick Page, you have to import use Illuminate\Foundation\Vite;
and run npm run dev or build
Lots of fragmented advice and Ideas here. Would be neat to simply see an updated guide
Let me know when you have finished it....
I haven’t tried it in a year and had zero luck then
Anyone had any luck with splade and integration with filamentPHP? I guess this issue will become redundant when livewire 3 drops.
Splade is Vue correct? Then probably not.
Feel like Splade would be a downgrade from Filament
they (vue/splade) are indeed similar and makes zero sense for filament
Yea. Splade is basically just a blade version of inertia so you don’t have to write your components / views in Vue.
There is a stack that is essentially a clone of Filamentphp but using splade. However, given the soon arrival of livewire V3... then it will likely be redundant.