#How can i publish view component that comes from filament ?
6 messages · Page 1 of 1 (latest)
Copy them manually. We don’t offer a command, because we don’t want people to overwrite them easily. Beware of the risks: You need to manually check whether those views are still good after updates.
I see that this thread is a bit old, so I hope it’s alright for me to write here.
As the original author already mentioned, I’m also at the point where I need to modify the templates/components.
I’ve read both this article and the documentation (link) which suggest that this isn’t generally recommended.
However, due to a specific design template I’m working with, I have no other option but to manually adjust the Blade components and the sidebar.
My question is, how can I apply this to a specific panel?
I was thinking about using lifecycle hooks (link).
Would I just need to adjust View::addNamespace for that?
My question is, how can I apply this to a specific panel?
As you are overriding the files anyway:
@if (Filament::getCurrentPanel() === 'your-id')
here comes your tempalte
@else
default template
@endif
Thank you very much, and sorry for the late response.
Would there perhaps be another way? Like specifying which Blade namespace path should be used in a particular panel?
That could get a bit complicated in certain places.
If that's not possible, I'd be happy to take a look at it.
If desired or if it makes sense, I can also submit a PR.