Devsome
Devsome
FFilament
Created by Devsome on 4/11/2025 in #❓┊help
ToggleColumn
No description
5 replies
FFilament
Created by Devsome on 4/11/2025 in #❓┊help
ToggleColumn
->columns([
Tables\Columns\ToggleColumn::make('used')
->label(__('deletions.table.use'))
->getStateUsing(function ($record) {
return $record->user()->where('user_id', auth()->id())->exists();
})
->afterStateUpdated(function ($state, $record) {
$userId = auth()->id();

if ($state) {
$record->user()->syncWithoutDetaching([$userId]);
$body = 'deletions.notification.success_added';
} else {
$record->user()->detach($userId);
$body = 'deletions.notification.success_removed';
}
Notification::make()
->title(__('deletions.notification.success_title'))
->body(__($body))
->success()
->send();
}),
Tables\Columns\TextColumn::make('reason')
->label(__('deletions.table.reason'))
->searchable(),
Tables\Columns\TextColumn::make('state')
->label(__('deletions.table.state'))
->formatStateUsing(fn($state) => Str::ucfirst($state))
->searchable(),
])
->columns([
Tables\Columns\ToggleColumn::make('used')
->label(__('deletions.table.use'))
->getStateUsing(function ($record) {
return $record->user()->where('user_id', auth()->id())->exists();
})
->afterStateUpdated(function ($state, $record) {
$userId = auth()->id();

if ($state) {
$record->user()->syncWithoutDetaching([$userId]);
$body = 'deletions.notification.success_added';
} else {
$record->user()->detach($userId);
$body = 'deletions.notification.success_removed';
}
Notification::make()
->title(__('deletions.notification.success_title'))
->body(__($body))
->success()
->send();
}),
Tables\Columns\TextColumn::make('reason')
->label(__('deletions.table.reason'))
->searchable(),
Tables\Columns\TextColumn::make('state')
->label(__('deletions.table.state'))
->formatStateUsing(fn($state) => Str::ucfirst($state))
->searchable(),
])
5 replies
FFilament
Created by Devsome on 3/30/2025 in #❓┊help
tailwind v3, vite.config - strange behavior
got it working now with the custom theme. After setting the "->viteTheme('resources/css/filament/dashboard/theme.css');" in the PanelProvider and running again ddev yarn build it successfully builded. Also replaced all the other @vite([]) includes for the none filament pages (like welcome screen) to get the correct design.
12 replies
FFilament
Created by Devsome on 3/30/2025 in #❓┊help
tailwind v3, vite.config - strange behavior
I have now downgraded tailwind v4 to v3, runned yarn build and artisan filament:assets, still the html is not correct.
12 replies
FFilament
Created by Devsome on 3/30/2025 in #❓┊help
tailwind v3, vite.config - strange behavior
I'll try it, thanks
12 replies
FFilament
Created by Davide Cariola on 8/12/2024 in #❓┊help
Using a FileUpload input in a Custom Page
Thanks for helping me, I had the same Problem :lecker:
16 replies