You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The last version (the big refactor you were talking) really solved a few issues we were having. A huge thank you for these improvements:
There was no filter logic so we built one ourselves as seen below. Though I'd keep the filters we've created ourselves I really also want to add the filter options you've created.
My question is: how am I able to store the filters (both search and custom filters) in to the query param, I tried both setting
public array $tableColumnSearches = [
'application_status',
];
Do you also have any advice on how add custom filter like ive created above in flowforge? Right now vibe-coded this solution mutating the getEloquentQuery and force a $refresh
public function getEloquentQuery(): Builder
{
// Get filters from session as fallback if properties are empty
$positionFilter = $this->positionFilter ?: session('application_board.positionFilter', '');
$statusFilters = ! empty($this->statusFilters) ? $this->statusFilters : session('application_board.statusFilters', []);
// Store current values in session
session(['application_board.positionFilter' => $positionFilter]);
session(['application_board.statusFilters' => $statusFilters]);
$query = Application::with(['candidate', 'vacancy.position', 'position']);
$query->when($positionFilter, function (Builder $q) use ($positionFilter) {
$q->where(function (Builder $subQ) use ($positionFilter) {
// Direct position relationship
$subQ->where('position_id', $positionFilter)
// OR through vacancy relationship
->orWhereHas('vacancy', function (Builder $vacancyQ) use ($positionFilter) {
$vacancyQ->where('position_id', $positionFilter);
});
});
});
$query->when(! empty($statusFilters), function (Builder $q) use ($statusFilters) {
$q->whereIn('application_status', $statusFilters);
});
return $query;
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The last version (the big refactor you were talking) really solved a few issues we were having. A huge thank you for these improvements:
There was no filter logic so we built one ourselves as seen below. Though I'd keep the filters we've created ourselves I really also want to add the filter options you've created.

My question is: how am I able to store the filters (both search and custom filters) in to the query param, I tried both setting
and
This is the filter
Do you also have any advice on how add custom filter like ive created above in flowforge? Right now vibe-coded this solution mutating the getEloquentQuery and force a
$refresh
Anyy advice regarding this?
Dennis
Beta Was this translation helpful? Give feedback.
All reactions