arsadi
arsadi
FFilament
Created by arsadi on 6/1/2024 in #❓┊help
Show Indicator on Custom Filter doesn't work
I think this is a bug
6 replies
FFilament
Created by arsadi on 6/1/2024 in #❓┊help
Show Indicator on Custom Filter doesn't work
It's work if I am not using deferFilters()
6 replies
FFilament
Created by arsadi on 6/1/2024 in #❓┊help
Show Indicator on Custom Filter doesn't work
Code:
Filter::make('created_at')
->form([
DatePicker::make('created_from')
->label('Created from'),
DatePicker::make('created_until')
->label('Created until'),
])
->columns(2)
->columnSpan(2)
->query(function (Builder $query, array $data): Builder {
return $query
->when(
$data['created_from'],
fn (Builder $query, $date): Builder => $query->whereDate('created_at', '>=', $date),
)
->when(
$data['created_until'],
fn (Builder $query, $date): Builder => $query->whereDate('created_at', '<=', $date),
);
})
->indicateUsing(function (array $data): array {
$indicators = [];

if ($data['created_from'] ?? null) {
$indicators[] = Indicator::make('Created from ' . Carbon::parse($data['created_from'])->toFormattedDateString())
->removeField('created_from');
}

if ($data['created_until'] ?? null) {
$indicators[] = Indicator::make('Created until ' . Carbon::parse($data['created_until'])->toFormattedDateString())
->removeField('created_until');
}

return $indicators;
})
Filter::make('created_at')
->form([
DatePicker::make('created_from')
->label('Created from'),
DatePicker::make('created_until')
->label('Created until'),
])
->columns(2)
->columnSpan(2)
->query(function (Builder $query, array $data): Builder {
return $query
->when(
$data['created_from'],
fn (Builder $query, $date): Builder => $query->whereDate('created_at', '>=', $date),
)
->when(
$data['created_until'],
fn (Builder $query, $date): Builder => $query->whereDate('created_at', '<=', $date),
);
})
->indicateUsing(function (array $data): array {
$indicators = [];

if ($data['created_from'] ?? null) {
$indicators[] = Indicator::make('Created from ' . Carbon::parse($data['created_from'])->toFormattedDateString())
->removeField('created_from');
}

if ($data['created_until'] ?? null) {
$indicators[] = Indicator::make('Created until ' . Carbon::parse($data['created_until'])->toFormattedDateString())
->removeField('created_until');
}

return $indicators;
})
6 replies
FFilament
Created by arsadi on 12/25/2023 in #❓┊help
Filament panel not installed yet
yes thankyou🙏
8 replies
FFilament
Created by BJ on 12/25/2023 in #❓┊help
image in edit not apear if i create image then when click edit button the image in downloaded only
please try to change your APP_URL with 127.0.0.1:8000
20 replies
FFilament
Created by arsadi on 12/25/2023 in #❓┊help
Filament panel not installed yet
8 replies
FFilament
Created by arsadi on 12/25/2023 in #❓┊help
Filament panel not installed yet
any help?
8 replies
FFilament
Created by BJ on 12/25/2023 in #❓┊help
image in edit not apear if i create image then when click edit button the image in downloaded only
can you check your console? is there any error on create/edit page?
20 replies
FFilament
Created by arsadi on 12/25/2023 in #❓┊help
Filament panel not installed yet
I also add the DashboardPanelProviders manually in my config/app.php
8 replies
FFilament
Created by arsadi on 12/25/2023 in #❓┊help
Filament panel not installed yet
Here is what happend if I ran php artisan filament:install --panels.
8 replies
FFilament
Created by arsadi on 12/4/2023 in #❓┊help
How to customize Breadcrumb label
No description
4 replies