#How can i publish view component that comes from filament ?

6 messages · Page 1 of 1 (latest)

bleak kiln
#

Some views that i wanted to customize such as login view, or topbar layout is only available in the vendor folder.

But i cant seem to find the command to publish those views on the internet.

old heartBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

grave ore
#

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.

feral onyx
#

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?

Filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.

grave ore
#

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
feral onyx
#

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.