umardi_
umardi_
FFilament
Created by umardi_ on 10/1/2024 in #❓┊help
Add Action Button on Topbar
Instead of create action directly in AppPanelProvider.php like before, i change it to livewire component:
->renderHook(
PanelsRenderHook::GLOBAL_SEARCH_AFTER,
fn (): string => Blade::render('@livewire(\'shopping-cart\')'),
)
->renderHook(
PanelsRenderHook::GLOBAL_SEARCH_AFTER,
fn (): string => Blade::render('@livewire(\'shopping-cart\')'),
)
// ShoppingCart.php ...
public function showCartAction(): Action
{
return Action::make('showCart')
->label('')
->icon('heroicon-o-shopping-cart')
->iconSize('lg')
->color('gray')
->iconButton()
->badge(function () {
if (auth()->user()->cart) {
return auth()->user()->cart->getEbookCount();
}
})
->badgeColor('warning')
->requiresConfirmation()
->form([
TextInput::make('subject'),
])
->action(function (array $data) {
// Handle the action logic here
// dd($data);
});
}
public function showCartAction(): Action
{
return Action::make('showCart')
->label('')
->icon('heroicon-o-shopping-cart')
->iconSize('lg')
->color('gray')
->iconButton()
->badge(function () {
if (auth()->user()->cart) {
return auth()->user()->cart->getEbookCount();
}
})
->badgeColor('warning')
->requiresConfirmation()
->form([
TextInput::make('subject'),
])
->action(function (array $data) {
// Handle the action logic here
// dd($data);
});
}
// shopping-cart.blade.php
<div>
{{ $this->showCartAction }}
<x-filament-actions::modals />
</div>
<div>
{{ $this->showCartAction }}
<x-filament-actions::modals />
</div>
4 replies
FFilament
Created by umardi_ on 10/1/2024 in #❓┊help
Add Action Button on Topbar
Ok, i've found the solution. Thank you.
4 replies
FFilament
Created by Pscl on 6/9/2024 in #❓┊help
Showing icons in Table Column Badge
how about use $record instead? not $state, get relationship manually, something like $record->types
10 replies
FFilament
Created by Pscl on 6/9/2024 in #❓┊help
Showing icons in Table Column Badge
Maybe you should use Closure as icon's parameter? https://filamentphp.com/docs/3.x/tables/columns/advanced
10 replies
FFilament
Created by umardi_ on 11/30/2023 in #❓┊help
Whitespace-pre-wrap Create Blank Spaces Around Text On Infolist TextEntry Component
No reply yet
2 replies
FFilament
Created by akame on 8/6/2023 in #❓┊help
Undefined method 'isAdmin'.
I have the same problem, and as long as it works, i just let it as it is.
18 replies
FFilament
Created by umardi_ on 3/20/2023 in #❓┊help
Dynamic getTableQuery on Toggle Filter
It's working with Select component form using custom filter. I can modify the null value. If I use Toggle component, is there a way to hide queryString filter from showing up in address bar for false value? For example, when I load list page, can I just show http://localhost:8000/peralatan instead of http://localhost:8000/peralatan?tableFilters[komponen_bukan][komponen_bukan]=0
5 replies
FFilament
Created by umardi_ on 3/20/2023 in #❓┊help
Dynamic getTableQuery on Toggle Filter
thank you, i'll take a look
5 replies
FFilament
Created by bahamagician on 3/17/2023 in #❓┊help
Set Value of Sibling Repeater Field from Form Event?
2 replies
FFilament
Created by Zeldroxe on 3/15/2023 in #❓┊help
How to change repeater design ?
It's fully responsive, just not collapsible
11 replies
FFilament
Created by Zeldroxe on 3/15/2023 in #❓┊help
How to change repeater design ?
TableRepeater plugin is more compact
11 replies
FFilament
Created by Mehmet K. on 3/16/2023 in #❓┊help
How can I create a modal form in the admin panel?
I always add the form method of Action to pop up form on button click
3 replies
FFilament
Created by umardi_ on 3/14/2023 in #❓┊help
NavigationBadge count number refresh/poll automatically
OK then. Thank you.
13 replies