joao nivaldo
joao nivaldo
FFilament
Created by joao nivaldo on 5/7/2024 in #❓┊help
Vertical scrolling after form submit
Hello everybody. I have a landpage where in the middle of it I have a contact form that I created using a Livewire component with the Form Builder in it. When I click on the submit button and it generates a validation error, when I return to the page it scrolls all the way to the end and stays there. To see if there was an error, I have to scroll up to the form again. Does anyone know how to solve this scrolling problem after submitting the form?
6 replies
FFilament
Created by joao nivaldo on 4/12/2024 in #❓┊help
Create a global search
Guys, what would be the best approach for me to take for the following resource. I need to create a screen for a global search. In the textobox I will enter the term and it will search in several models. The result must be grouped by model and must be displayed in a table. How should I do this? Thanks
15 replies
FFilament
Created by joao nivaldo on 4/2/2024 in #❓┊help
Incorrect ordering
No description
11 replies
FFilament
Created by joao nivaldo on 3/25/2024 in #❓┊help
Call the modal form from the button on the blade page
Hello, everyone, is it possible in Filament v2 to associate a button on a blade page of a livewiere component and open a Filament modal with a form inside, just like I do in a Table Builder Action? I would like to open the same form that I have in Edit Action on this page. Thanks
2 replies
FFilament
Created by joao nivaldo on 3/21/2024 in #❓┊help
Refresh child selects
No description
6 replies
FFilament
Created by joao nivaldo on 3/20/2024 in #❓┊help
Select does not load default value in Edit Action with relationship
No description
6 replies
FFilament
Created by joao nivaldo on 3/8/2024 in #❓┊help
Set Table Actions Position in v2
No description
28 replies
FFilament
Created by joao nivaldo on 2/27/2024 in #❓┊help
Strange error
Hello everybody. Guys, has anyone experienced this error: The site is working perfectly, but I can't run any artisan commands. If I try something I get this error:
In UrlGenerator.php line 128: Illuminate\Routing\UrlGenerator::__construct(): Argument #2 ($request) must be of type Illuminate\Http\Request, null given, called in C:\www\Casa20 24\vendor\laravel\framework\src\Illuminate\Routing\RoutingServiceProvider.php on line 67
The site only has a backend with Filament v3 with a single dashboard. The Laravel log only has this information, I have no way of knowing where it comes from. Do you have any idea how I can find out where this error is coming from?
2 replies
FFilament
Created by joao nivaldo on 2/18/2024 in #❓┊help
Upload does not send file larger than 12 megabytes
No description
5 replies
FFilament
Created by joao nivaldo on 2/16/2024 in #❓┊help
Enable component caching
No description
8 replies
FFilament
Created by joao nivaldo on 2/15/2024 in #❓┊help
Redirect initial route according to Role
How do I define the route where the user goes according to their Role after logging in? ex. if he is an Admin he goes to the Dashboard if he is a Manager he goes to Products. Thanks.
5 replies
FFilament
Created by joao nivaldo on 2/12/2024 in #❓┊help
Action for PDF and JPG preview
Hi, I need to create a preview action to display a preview of PDF and JPG files in a modal. How should I proceed, is there something ready in Filament? Thanks.
16 replies
FFilament
Created by joao nivaldo on 2/12/2024 in #❓┊help
Use select in the table header
Hello everybody. Is there a way to put a relationship select in the Header Action of a table so I can choose what will be displayed in the table? Type a select to choose user groups. Then I choose Administrators and all users in the administrators group would be displayed in the table. Is there a way to do this? Thanks.
6 replies
FFilament
Created by joao nivaldo on 2/10/2024 in #❓┊help
Adjust the modal height
No description
5 replies
FFilament
Created by joao nivaldo on 1/22/2024 in #❓┊help
Hide table header when printing
No description
2 replies
FFilament
Created by joao nivaldo on 1/16/2024 in #❓┊help
Upload does not validate quantity and size
No description
7 replies
FFilament
Created by joao nivaldo on 12/6/2023 in #❓┊help
Error when executing a table on a custom page
Hello everybody. I created a custom page and included a table. But when I run this page it gives the following message: "Table [App\Filament\Pages\Relatorios\RelatorioListaImoveis] must have a [query()].". What is missing to display the table correctly on the page? Thanks
class RelatorioListaImoveis extends Page implements Tables\Contracts\HasTable
{
use LivewireAlert;

use InteractsWithTable;

protected static ?string $model = Imovel::class;

protected static ?string $navigationIcon = 'fas-file-lines';

protected static string $view = 'filament.pages.relatorio-lista-imoveis';

public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('id'),
Tables\Columns\TextColumn::make('fantasia_contato')
->label('Nome Fantasia')
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('ativo')
->label('Ativo')
->state(function (Imovel $record): string {
return $record->ativo == SimNaoEnum::SIM->value ? 'Sim' : 'Não';
})
->sortable(),
])
->paginated(false)
->filters([])
->actions([])
->bulkActions([]);
}

public function getTableQuery(): Builder
{
return Imovel::query();
}
}
class RelatorioListaImoveis extends Page implements Tables\Contracts\HasTable
{
use LivewireAlert;

use InteractsWithTable;

protected static ?string $model = Imovel::class;

protected static ?string $navigationIcon = 'fas-file-lines';

protected static string $view = 'filament.pages.relatorio-lista-imoveis';

public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('id'),
Tables\Columns\TextColumn::make('fantasia_contato')
->label('Nome Fantasia')
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('ativo')
->label('Ativo')
->state(function (Imovel $record): string {
return $record->ativo == SimNaoEnum::SIM->value ? 'Sim' : 'Não';
})
->sortable(),
])
->paginated(false)
->filters([])
->actions([])
->bulkActions([]);
}

public function getTableQuery(): Builder
{
return Imovel::query();
}
}
5 replies
FFilament
Created by joao nivaldo on 12/4/2023 in #❓┊help
Show images in columns in Infolist Image Entrey
No description
7 replies
FFilament
Created by joao nivaldo on 12/4/2023 in #❓┊help
Print infolist only
Hello everybody. Guys, I have a button inside an InfoLIst that opens the print screen. But along with it comes the sidebar and top menu of the Filament v3 layout. Can I disable everything in the layout and leave only the infllist section to appear in print? Thanks
8 replies
FFilament
Created by joao nivaldo on 11/30/2023 in #❓┊help
Default value does not load correctly in MorphToSelect
Hello, I need some guidance from you, when I apply the modifyOptionQueryUsing method on the default value of the second select it shows the id instead of the chosen label. If I remove the modifyOptionQueryUsing method it displays the default value correctly. My code is like this:
MorphToSelect::make('dono')
->types([MorphToSelect\Type::make(Imobiliaria::class)
->getOptionLabelFromRecordUsing(fn(Imobiliaria $record): string => "{$record->fantasia_contato}")
->modifyOptionsQueryUsing(fn(Builder $query) => $query->where('ativo', StatusEnum::ACTIVE->value))
->titleAttribute('fantasia_contato'),
MorphToSelect\Type::make(Proprietario::class)
->modifyOptionsQueryUsing(fn(Builder $query) => $query->where('ativo', StatusEnum::ACTIVE->value))
->titleAttribute('razao_nome'),
])
->label('Pertencente a')
->searchable()
->preload()
->required()
->columnSpanFull(),
MorphToSelect::make('dono')
->types([MorphToSelect\Type::make(Imobiliaria::class)
->getOptionLabelFromRecordUsing(fn(Imobiliaria $record): string => "{$record->fantasia_contato}")
->modifyOptionsQueryUsing(fn(Builder $query) => $query->where('ativo', StatusEnum::ACTIVE->value))
->titleAttribute('fantasia_contato'),
MorphToSelect\Type::make(Proprietario::class)
->modifyOptionsQueryUsing(fn(Builder $query) => $query->where('ativo', StatusEnum::ACTIVE->value))
->titleAttribute('razao_nome'),
])
->label('Pertencente a')
->searchable()
->preload()
->required()
->columnSpanFull(),
Thanks.
4 replies