403gtfo
Is sortable() and/or searchable() possible on a HasOneThrough relation?
I don't think I have asked this before...
But it is a hard one.
The setup:
- One Staff can have many positions.
- One Position has one Discipline.
- Positions have an end_date field
The question:
Is it possible to have a HasOneThrough relation work with sortable() on the StaffResource?
Relation:
Text column:
1 replies
Sort one to many TextColumn based on formatted state?
Hey team, I am having another moment... is there a way to sort a one to many text column based on the concatenated string?
Column:
Throws this error, as one would expect if it was using the column raw data to sort.
Any advice is greatly appreciated.
9 replies
Help with persistent table order after saving
Hi team I have an edit page that redirect back to the table after using:
The problem is:
If a user has changed the sorting, it resets and they have to resort again which can be a pain if they are doing a lot of updates.
I also have this on the $table though that doesn't seem to store the order.
Any advice would be greatly appreciated. I am sure it is something simple.
5 replies
Advanced Tables (Plugin) Example / advice.
I thought it might be best for me to put this in the help section and not just the community tab.
is there a github repo showing some examples like for the demo?
I've tried setting up filters on a table and all I want to do is say "For the Discipline filter, use the relation and a SELECT box".
Clearly I am doing something wrong as it seems to preload this filter in when I hit reset. I only what the filter to appear when the user selects it.
I am sure it is dead easy but I just missed it.
5 replies
Noob question: Sorting a hasMany column in table
I'm really struggle sorry and I am sure it is dead easy to do.
Apologies, I know I've asked a bunch of relation questions, but that seems to be where stuff explodes for me.
What I am trying to do:
I need the HIndex column in the Activities table to be sortable based on the related HIndex with the highest year value (or based on the formatted state would be even better)
Model Activity:
- has many HIndex via
Model HIndex :
- Belongs to one Activity
- Has the columns
-- year
-- value
-- activity_id
In the Activity resource I have:
But it throws:
SQLSTATE[21000]: Cardinality violation: 1242 Subquery returns more than 1 row
3 replies
is there a formatStateUsing for IconColumn?
What I have:
I have a table with a one-to-many boolean icon column (positionData.is_active)
Currently the State is populates with all the records for example (true, false, true)
What I want to do:
I just want a single value returned.
What I have tried
If it was a TextColumn I could use something like
But this doesnt seem to be a thing for IconColumns.
I've tried using the
But the format and size is totally different than the Icon Columns. Any suggestions?
But the format and size is totally different than the Icon Columns. Any suggestions?
9 replies
getEloquentQuery() many to may relation multi row per attachment
I am trying to customize the query using getEloquentQuery() and am having trouble getting the query to return what I am after. Any help would be greatly appreciated, also if there is a better way please let me know. It may be more a eloquent help request than anything.
Setup: - Activity 1, Staff A, Staff B - Activity 2, Staff B What I need the query to return for me table: - Activity 1 Staff A - Activity 1 Staff B -Activity 2 Staff B There is a bunch of other joins and stuff I need to do based on the staff member thus I am try to use getEloquentQuery(). For the life of me I cant wrap my head around how I need to format it to make it work.
Setup: - Activity 1, Staff A, Staff B - Activity 2, Staff B What I need the query to return for me table: - Activity 1 Staff A - Activity 1 Staff B -Activity 2 Staff B There is a bunch of other joins and stuff I need to do based on the staff member thus I am try to use getEloquentQuery(). For the life of me I cant wrap my head around how I need to format it to make it work.
4 replies
Help with creating a github bug ticket.
Sorry guys, I dont normally make bug tickets. I have tried making one twice now and the gitbot keeps closing it down claiming there is not repo provided...
The first one that was true, but I couldn't seem to reopen it after updating it.
The second one, just auto closed even when provided.
It's not a big issue, and I could put in a hacky fix for myself, but I am just trying to assist in improvements.
Any advice on how I was meant to format it or how I go about consensually stepping on the gitbot?
Ticket: https://github.com/filamentphp/filament/issues/9517
9 replies