Igor
Igor
FFilament
Created by Igor on 2/23/2024 in #❓┊help
conditional configureusing
I am using configureUsing function to set up all my text inputs to uppercase. However, this causes an issue with the reset password feature, as the email field also becomes uppercase and the database is unable to find any email due to the case sensitivity. Is it possible to set all inputs to uppercase except for the email field?
6 replies
FFilament
Created by Igor on 2/9/2024 in #❓┊help
Is possible keep columns names with Grid or Split layout ?
I'm trying to make my table more mobile friendly, but if I use Grid or Split recommended in the documentation I lose my columns name in desktop view, someone get this working simultaneously?
4 replies
FFilament
Created by Igor on 2/5/2024 in #❓┊help
Can't reproduce stack column documentation layout
Hi, I'm trying to stack two columns into one, looking at the documentation I can see that there are some components for this, but when I do it in my code, all columns are affected, even the outside of split/stack. I'm doing something wrong? * I'm using groups and filter as well return $table ->defaultGroup('status') ->defaultSort('updated_at', 'desc') ->groups([ Group::make('status') ->titlePrefixedWithLabel(false)->collapsible(), ]) ->columns([ Split::make([ Stack::make([ TextColumn::make('id') ->label('Chamado ID') ->searchable(), TextColumn::make('processo') ->copyable() ->searchable(), ])->space(1), ]), TextColumn::make('cliente.nome') ->wrap() ->searchable(),
3 replies
FFilament
Created by Igor on 1/29/2024 in #❓┊help
$subNavigationPosition for cluster ?
This should be working or is not implemented yet ?
5 replies
FFilament
Created by Igor on 1/25/2024 in #❓┊help
Select with relationship and custom label
I am using a select component, but I am facing an issue when I try to customize the query to only show active items. In this case, my custom label is not being used and instead, the ID is being shown as the label. However, when I remove the custom query, my custom label is used. I am not sure what I am doing wrong. Can you please help me with this issue? Forms\Components\Select::make('agente_id') ->columnSpan(2) ->default(Request::query('agente')) ->label('Agente') ->relationship( name: 'agentesRelated', modifyQueryUsing: fn (Builder $query) => $query->active() ) ->getOptionLabelFromRecordUsing(fn (Agente $record) => view('agenteSelectItem', $record)->render()) ->searchable(['nome']) ->allowHtml() ->native(false) ->live(onBlur: true) ->required(),
2 replies
FFilament
Created by Igor on 1/20/2024 in #❓┊help
Duration / Time Span input
I saw that filament has a time input, but for my case is more a duration, like from 30 min to 50 hours, I was wordering if is possible something with the tools that filament offers, someone have a idea ?
6 replies
FFilament
Created by Igor on 1/13/2024 in #❓┊help
Summary with eloquent Accessor is possible ?
Hey there, I'm having some trouble summarizing a column in a price table. The prices in this column come from a custom attribute in my model (total), which is built using various columns from the database. As a result, I'm getting an error message saying that the column doesn't exist. Does anyone have any tips or tricks for how to work around this issue? Thanks!
Tables\Columns\TextColumn::make('total') ->label("Valor a pagar") ->sortable() ->money('BRL') ->summarize(Sum::make()->label("Valor Total")),
3 replies
FFilament
Created by Igor on 1/9/2024 in #❓┊help
1 resource with 2 ManageRecord is possible ?
Hello everyone, I have one model and a related resource, and I require two pages to list, edit and remove the data with a modal. The form and table will be the same on both pages, but one page requires a specific filter, while the other page will need a different filter.
3 replies
FFilament
Created by Igor on 1/8/2024 in #❓┊help
any idea for improving file pond loading?
Hi guys, I have a lot of file inputs in my filament project, and when the page loads the file input stays with the native input for a couple of seconds until the file pond takes the place, either with multiple inputs per page/form, someone had any tip or trick to improve this issue?
4 replies
FFilament
Created by Igor on 1/5/2024 in #❓┊help
Repeater with fileupload mixing state between them
I have a repeater which has a file upload and a text input field. However, when I have two or more repeater items, the file upload messes with the state. For example, if I add an image in repeater block 1 and save it, and then reload the page, the repeater block 2 will also have the same image.
return Tabs\Tab::make('Fotos') ->icon('heroicon-s-photo') ->schema([ Forms\Components\Repeater::make('grupo_fotos') ->label('') ->reorderable(false) ->collapsible() ->defaultItems(1) ->addActionLabel("Adicionar novo grupo de fotos") ->grid(2) ->schema([ SpatieMediaLibraryFileUpload::make('fotos') ->multiple() ->image() ->minFiles(1) ->maxFiles(4) ->helperText("Máximo de 4 imagens por grupo") ->panelLayout(null) ->previewable() ->columns(2) ->openable() ->customProperties(function (Get $get) { return ['descricao'=>$get('descricao')]; }) ->collection('photos'), Forms\Components\TextInput::make('descricao') ->label('Descrição') ->required(), ]), ]);
7 replies
FFilament
Created by Igor on 12/27/2023 in #❓┊help
spatie/laravel-medialibrary fallback image do not work
I'm have a optional image field and I want to show a default image if any image was added, According to the spatie documentation if I add fallback urls and path to collection should be enough, but the image column do not show the fallback image, it's a bug or I'm doing wrong?
6 replies
FFilament
Created by Igor on 12/24/2023 in #❓┊help
Is it possible to add a widget inside a form or above it?
I was wondering if adding a custom widget that I built inside a form or above it is possible, is a Google map to help the visualization of the data.
5 replies
FFilament
Created by Igor on 12/22/2023 in #❓┊help
Is possible the TimePicker accept more than 24 hours ?
I need a input for time, but allowing more than 24 hours, like: I spent 43 Hours and 20 minutes
5 replies
FFilament
Created by Igor on 12/17/2023 in #❓┊help
Conditional Select options don`t work if disabled field
Hi guys, seems a bug to me. I'm trying enable and add options dynamically in a select after another select changes, but if I add the disabled option in the second select, it not add any option, if I remove it, works like a charm
Select::make('cliente_id') ->relationship('cliente', 'nome') ->searchable() ->live(onBlur: true) ->required(), Select::make('veiculo_cliente') ->required() ->disabled(fn (Get $get): bool => ! $get('cliente_id')) ->native(false) ->allowHtml() ->options(function (Get $get) { $id = $get('cliente_id'); if (!$id) { return []; } return Cliente::find($id)->veiculos->map( function (array $veiculo) { return view('veiculoSelectItem',$veiculo)->render(); })->toArray(); })
2 replies
FFilament
Created by Igor on 12/15/2023 in #❓┊help
Edit is not populating the Repeater with the appropriate relationship.
Hi there! I'm currently working on building a client resource that requires adding multiple vehicles. To achieve this, I created a DB table for store the vehicles and used the hasMany relationship with my client model. The create action works perfectly, allowing me to add multiple vehicles using the repeater input. However, when I try to edit a previously created client who already has some vehicles associated with them, all the fields are filled correctly except for the repeater. The repeater doesn't show the previously added vehicles but still allows me to add new ones. Any suggestions on how to fix this would be greatly appreciated.
20 replies