charlie
charlie
FFilament
Created by Tio Átila on 1/21/2025 in #❓┊help
Refresh badge count after filter table
try with something like:
->badge(fn () => $this->getFilteredTableQuery()->clone()->where('your_condition', true)->count())
->badge(fn () => $this->getFilteredTableQuery()->clone()->where('your_condition', true)->count())
2 replies
FFilament
Created by bald on 9/23/2024 in #❓┊help
Table's Query Builder is not shown shown in full width
try
// ...
->filters([
Tables\Filters\QueryBuilder::make()
->constraints([
Constraints\DateConstraint::make('start_date'),
Constraints\DateConstraint::make('end_date'),
])->columns(2),
])
// ...
->filters([
Tables\Filters\QueryBuilder::make()
->constraints([
Constraints\DateConstraint::make('start_date'),
Constraints\DateConstraint::make('end_date'),
])->columns(2),
])
(maybe...)
4 replies
FFilament
Created by mathieutu on 1/21/2025 in #❓┊help
Simple repeater and $get
Hi @mathieutu, that's the normal behavior if I'm not mistaken (nice to see you finally get into filament ;))
2 replies
FFilament
Created by morty on 1/21/2025 in #❓┊help
Is there a way to evaluate this immediately without returning a closure?
with two fields with hiddenOn('create') or hiddenOn('edit')?
4 replies
FFilament
Created by charlie on 1/19/2025 in #❓┊help
How to use Alpine in Filament?
wow, this feature is pure gold
26 replies
FFilament
Created by charlie on 1/19/2025 in #❓┊help
How to use Alpine in Filament?
Yeah, I did it!!! https://filament-theme-generator.charlie-etienne.fr/ Not even one server request! I don't know if it follows the best Alpine practices, but I manage to make it work and it's FAST Thanks to both of you @Leandro Ferreira and @ralphjsmit
26 replies
FFilament
Created by charlie on 1/19/2025 in #❓┊help
How to use Alpine in Filament?
oh, interesting, thanks
26 replies
FFilament
Created by charlie on 1/19/2025 in #❓┊help
How to use Alpine in Filament?
Thank you @Leandro Ferreira , yeah I wanted to avoid extraAttributes cause I have a bunch of JS and I would prefer to extract it.
26 replies
FFilament
Created by charlie on 1/19/2025 in #❓┊help
How to use Alpine in Filament?
To add a bit of context, what I'm trying to do is exactly that: https://filament-theme-generator.charlie-etienne.fr/ so update the code when the color changes, BUT in client only (since it doesn't need to call the server here)
26 replies
FFilament
Created by charlie on 1/19/2025 in #❓┊help
How to use Alpine in Filament?
Ok, I thought it was already entangled by Filament. I cannot say I understand better 😅 , but thank you very much, I will explore all that
26 replies
FFilament
Created by charlie on 1/19/2025 in #❓┊help
How to use Alpine in Filament?
So what you say is I need to entangle myself the fields in a div? Like that?
<x-filament-panels::page>
<div
x-data="{
my_text_input: $wire.entangle('my_text_input').live,
another_text_input: $wire.entangle('another_text_input').live
}
x-init="..."
>
{{ $this->form }}
</div>

<script>
document.addEventListener('alpine:init', () => {
console.log('Alpine initialized'); // It works

Alpine.data('my_text_input', ({ state }) => ({
state,

init() {
console.log(this.state) // Doesn't work
},
onclick() {
console.log(this.state) // Doesn't work
},
change() {
console.log(this.state) // Doesn't work
},

})
</script>

</x-filament-panels::page>
<x-filament-panels::page>
<div
x-data="{
my_text_input: $wire.entangle('my_text_input').live,
another_text_input: $wire.entangle('another_text_input').live
}
x-init="..."
>
{{ $this->form }}
</div>

<script>
document.addEventListener('alpine:init', () => {
console.log('Alpine initialized'); // It works

Alpine.data('my_text_input', ({ state }) => ({
state,

init() {
console.log(this.state) // Doesn't work
},
onclick() {
console.log(this.state) // Doesn't work
},
change() {
console.log(this.state) // Doesn't work
},

})
</script>

</x-filament-panels::page>
26 replies
FFilament
Created by charlie on 1/19/2025 in #❓┊help
How to use Alpine in Filament?
wait, I'll read your message again
26 replies
FFilament
Created by charlie on 1/19/2025 in #❓┊help
How to use Alpine in Filament?
In my case I doesn't need any database connection, I try to avoid request and do all the reactive logic with Alpine only, without Livewire
26 replies
FFilament
Created by charlie on 1/19/2025 in #❓┊help
How to use Alpine in Filament?
Thank you but what I looking for is a way to interact with an existing TextInput or ColorPicker without extending it (if possible)
26 replies
FFilament
Created by Jpac14 on 1/20/2025 in #❓┊help
Assign role not working with filament shield
4 replies
FFilament
Created by djonata on 1/18/2025 in #❓┊help
Disable form and button save
Hi! This is how I'm doing it in one of my projects:
public static function form(Form $form): Form
{
return $form
->disabled(fn(?Session $record) => $record?->closed)
public static function form(Form $form): Form
{
return $form
->disabled(fn(?Session $record) => $record?->closed)
5 replies
FFilament
Created by Matthew on 12/14/2024 in #❓┊help
Fileupload doesnt save original name in attachment_file_names
ok, I don't know, sorry
57 replies
FFilament
Created by Matthew on 12/14/2024 in #❓┊help
Fileupload doesnt save original name in attachment_file_names
if you don't have ->multiple(), you shouldn't cast to an array
57 replies
FFilament
Created by nazar on 12/14/2024 in #❓┊help
Filamentphp in shared hosting
make a subdomain?
10 replies
FFilament
Created by HardFist on 2/27/2024 in #❓┊help
I have problem when upload it to Share Hosting
agree, but sometimes copying the vendor through ftp won't work, depending on the config/packages. And someday you'll regret not having ssh.
24 replies