Can I use filament to build sites other than Admin Panels?
I have experience in web development but I’m new to Laravel, and I’m trying to use Filament for the first time. I’d like to know if Filament can be used to create custom forms. The documentation suggests that it can, but I’m having trouble understanding it, likely due to my inexperience with Laravel. What is the best way to start integrating Filament with Laravel? Is Filament only intended for admin panels?
22 Replies
What is the best way to start integrating Filament with Laravel?
If you want to use only Forms: https://filamentphp.com/docs/3.x/forms/installation
https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component
Filament is designed for user/admin panels, SASS products etc.
For forms see Leandro's comment
impossible to make multilanguage website (in frontend)
What...
i've made a very complex app with filament out of nothing
now for a simple website, i need the frontend in 2 languages.. and nothing...
i have setup my model (page) with translatable title/slug and content
i have tried 300 different possible solution but i can't switch one simple page from one language to another (different slug) also, you can't have a page with different language but same slug (/ for the home)
You can do it if you have multitenancy or just if you have users. Check out https://github.com/andrewdwallo/erpsaas
GitHub
GitHub - andrewdwallo/erpsaas: A Laravel and Filament-powered accou...
A Laravel and Filament-powered accounting platform, crafting a modern and automated solution for financial management. - andrewdwallo/erpsaas
It has multi language support
Per tenant
@Andrew Wallo it has a frontend?
because i had no problem to do it in panels
What do you mean it has a frontend?
a regular website
What’s your definition of a frontend
with filament in backend
frontend = public website
Oh well yeah.. that’s probably why you can’t have multi language easily because the users specified language isn’t tied to them
You can try storing it in the browser/session
no, the user can choose the language of the content trough a languageswitcher that can set the locale in the session
But then again the specified language isn’t stored for a user in the database
not interest in user settings
frontend is public not for the user
Yeah exactly. Then how would you store the users preference for the language? You would need to use Google Translate or something
my problem is that i can't switch languages in frontend
database are in 2 languages but, for example
i'm in the english page ABOUT (slug: about)
i want oto switch to italian CHI SIAMO (slug: chisiamo)
and this is impossible
no...
Maybe I’m just confused on what your talking about then
my model PAGE is for making PAGES
pages are, for example: about, services etc...
with spatie translatable, in the backend (form) i'm able to store the content in all the available languages
in frontend (public website) i have a menu with link to those pages
the problem starts when i want to see the page in the other languages...
This doesn’t have anything to do with filament. Your “frontend” just needs the appropriate middleware to change the app’s local based on either a subdomain or a path segment.
Then your switcher just has the appropriate links and the middleware will handle the rest.
Spatie’s package will use the appropriate translation on the model attributes based on the app locale.
i will try again tomorrow with fresh and rest mind