Firebat
Firebat
FFilament
Created by Firebat on 1/20/2025 in #❓┊help
state/reactive filters question
As in some apps(my case), I would need that filters interact with each other to change the query results of the select filter. So the only way of achieving this result would be thru custom filters, and seeing that they have access to the form fields they would have access to state... That would be the recommended way or is there a better way to achieve reactive filters? Example: after the user changed the city in the filter it would change the neighborhood options
3 replies
FFilament
Created by Firebat on 1/7/2025 in #❓┊help
Custom page form repeater livewire error: property does not exist
This happens whenever I have a field inside of the repeater, i tested with select and text input
class PeticaoInicialFormPage extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.peticao-inicial-form-page';

protected static ?string $navigationLabel = 'Criar Petição Inicial';

protected static ?string $title = 'Petição Inicial';

public function form(Form $form): Form
{
return $form
->schema([
Repeater::make('index')
->label('')
->collapsible()
->addActionLabel('Adicionar Tema')
->schema([
TextInput::make('Nome')
]),
]);
}

protected function getHeaderActions(): array
{
return [
Action::make('Gerar')
->requiresConfirmation(),
];
}
}
class PeticaoInicialFormPage extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.peticao-inicial-form-page';

protected static ?string $navigationLabel = 'Criar Petição Inicial';

protected static ?string $title = 'Petição Inicial';

public function form(Form $form): Form
{
return $form
->schema([
Repeater::make('index')
->label('')
->collapsible()
->addActionLabel('Adicionar Tema')
->schema([
TextInput::make('Nome')
]),
]);
}

protected function getHeaderActions(): array
{
return [
Action::make('Gerar')
->requiresConfirmation(),
];
}
}
the blade file ```<x-filament-panels::page> {{ $this->form }} </x-filament-panels::page>
6 replies
FFilament
Created by Firebat on 11/28/2024 in #❓┊help
Select with belongsToMany. anyway of having it work but not accepting mulitple values?
Im having this question due to the docs on Select with eloquent relation. I have the relation of users/teams, the user should only participate in one team but i don't want to give the user the ability to insert a user to multiple teams. Should it be doable by puting rules/validation to the field or there is a another way?
4 replies
FFilament
Created by Firebat on 11/5/2024 in #❓┊help
Select with multiple doesn't show previously selected record because they are softdeleted
I know it is because of Laravel eloquent and i could change the query to withTrashed but the hard part is that the options should not list softdeleted, because in the app they are "archived", but the previously selected options should. I can make the "same" option work in relations that store a id on the table using getOptionLabelUsing, i tried using getOptionLabelsUsing on the multiple form Select but to no affect, any on how to make it work?
9 replies
FFilament
Created by Firebat on 10/17/2024 in #❓┊help
Change action priority in clickable rows
Due to Model policies i have View actions and Edit actions, but when i have View action it changes the priority from edit to view, is there any way of changing that behaviour?
12 replies
FFilament
Created by Firebat on 10/7/2024 in #❓┊help
Unable to create notifications
Trying to create notifications in the database, i followed the docs but when i use any of the recommended methods it doesn't throw a error nor does it create a notification, any idea why? Methods that i tried: $recipient = auth()->user(); Notification::make() ->title('Saved successfully') ->sendToDatabase($recipient); $recipient = auth()->user(); $recipient->notify( Notification::make() ->title('Saved successfully') ->toDatabase(), ); Currently using laravel 11 and the latest version of filament "filament/filament": "^3.2.115"
5 replies
FFilament
Created by Firebat on 9/30/2024 in #❓┊help
Table Tabs in RelationManager
How can i achieve the same result as the GetTabs from a resource ListPage in a relation manager? im referring to https://filamentphp.com/docs/3.x/panels/resources/listing-records#using-tabs-to-filter-the-records
6 replies
FFilament
Created by Firebat on 9/16/2024 in #❓┊help
Passing JSON key to $wire.updateTableColumnState, in a custom column
No description
4 replies
FFilament
Created by Firebat on 9/12/2024 in #❓┊help
Anyway of accessing $record inside of View::make()->components() ?
following code is trying to iterate thru a json, so that the toggle works View::make('view')->view('tables.columns.delivery') ->components( function($record) { $components = []; foreach($record->itens as $key => $item) { $components[] = ToggleColumn::make('itens.'.$key.'.Entregue') ->label($item['Nome']); } return $components; } ) before i was doing: ToggleColumn::make('itens.1.Entregue') ->label('Algo') It was working, but i need to iterate thru the json, but i cant access $record, something im doing wrong?
2 replies
FFilament
Created by Firebat on 9/12/2024 in #❓┊help
Undefined constant "heroicon" on x-filament::icon
As my last post, im trying to cannibalize the toggle button to a normal livewire component, but i hit a problem, while using x-filament::icon and passing the icon without the $getOffIcon() i get the error Undefined constant "heroicon", so im trying to debug it but i cant find the source code on the vendor, any hint?
5 replies
FFilament
Created by Firebat on 9/11/2024 in #❓┊help
Does a Toggle blade component exist?
I want to use it in my View::make but i didn't found on the documentation of Core Concepts -> Blade Components, if not possible where can i get the styling and js so i can cannibalize it?
5 replies
FFilament
Created by Firebat on 9/11/2024 in #❓┊help
Change side collapsible() appears in table builder
by following the example in https://filamentphp.com/docs/3.x/tables/layout#custom-html, i just want to know if there is a way to put it on the left of the row
2 replies