F
Filament15mo ago
Mauro T

Filament component

Hello! I wanted to know what is the correct way to implement a grid system on a custom page is, and also how to add labels to each of the input components. Additionally, I would like to know the correct way to declare a route within the panel that returns a downloadable file. Regards.
14 Replies
krekas
krekas15mo ago
to download files there's already answer here just search for it. but the answer is in the livewire docs file downloads page for grid depends what you want to show but basically css labels to form inputs are added automatically if you need to change it use label() but it looks you haven't looked at the docs first
Mauro T
Mauro TOP15mo ago
Thank you for responding. Yes, I have read the documentation (https://filamentphp.com/docs/3.x/support/blade-components/input) and I also tried using the label="..." property to see if a label was added to the input, but that doesn't seem to be working.
DrByte
DrByte15mo ago
@Mauro T you'll need to post your code, otherwise we're just guessing
Mauro T
Mauro TOP15mo ago
No description
Mauro T
Mauro TOP15mo ago
It's not complex at all, I just wanted to know if there's a way to generate the label from what filamentphp provides in a custom page
DrByte
DrByte15mo ago
okay Have you looked at the built-in Filament templates? Have you seen how they extract data in @php/@endphp tags by calling various component methods to fill template variables? For example, in the template, $getLabel() will call getLabel() on the component class to retrieve its $label property, so you can output it in your template.
Mauro T
Mauro TOP15mo ago
No, I haven't seen the template. Furthermore, I'm not sure about your comment. Could you provide me with an example?
DrByte
DrByte15mo ago
This video (and the series it's in) by Dan Harrin (Filament) may help explain more.
DrByte
DrByte15mo ago
Laracasts
Global Component Configuration
Global component configuration allows you to define a set of default configuration settings for all instances of...
krekas
krekas15mo ago
I don't understand why are you making form like that and not using forms package properly?
Mauro T
Mauro TOP15mo ago
How do you suggest I do it?
krekas
krekas15mo ago
Umm. Read docs maybe
Want results from more Discord servers?
Add your server