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
Patrick Boivin
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
benshawuk
benshawukOP2y ago
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.
Mark Chaney
Mark Chaney2y ago
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.
awcodes
awcodes2y ago
Did you read the comments? There’s one about using it with vite.
benshawuk
benshawukOP2y ago
Yes, I didn't have any luck getting that working. I will try again and post back with solutions once I do.
awcodes
awcodes2y ago
I’ll give it a go too. Shouldn’t be too difficult though. Vite vs Webpack. They ultimately do the same thing.
benshawuk
benshawukOP2y ago
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.
awcodes
awcodes2y ago
But the Vite vs webpack part isn’t relevant it’s about the order of the scripts being loaded.
Andrew Wallo
Andrew Wallo2y ago
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.
benshawuk
benshawukOP2y ago
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?
Vp
Vp2y ago
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
Mark Chaney
Mark Chaney2y ago
Lots of fragmented advice and Ideas here. Would be neat to simply see an updated guide
toeknee
toeknee2y ago
Let me know when you have finished it....
Mark Chaney
Mark Chaney2y ago
I haven’t tried it in a year and had zero luck then
benshawuk
benshawukOP2y ago
Anyone had any luck with splade and integration with filamentPHP? I guess this issue will become redundant when livewire 3 drops.
Andrew Wallo
Andrew Wallo2y ago
Splade is Vue correct? Then probably not. Feel like Splade would be a downgrade from Filament
Mark Chaney
Mark Chaney2y ago
they (vue/splade) are indeed similar and makes zero sense for filament
Patrick Boivin
I think Splade is more similar/on the level of Inertia than Filament... but yeah, I don't see a compelling reason to integrate it in the Filament admin. Maybe on the front-end if your team is already familiar with Blade + Vue? Scratch that... I see Splade also has table and form components 😄
awcodes
awcodes2y ago
Yea. Splade is basically just a blade version of inertia so you don’t have to write your components / views in Vue.
toeknee
toeknee2y ago
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.
Want results from more Discord servers?
Add your server