Very quick question about relationships.
Hey all I'm using the table builder.
What is best practice to add a where clausule and display a check if true?
So in pseudo-code i mean something like this
Display a check if a user exists where language_id = 1 .
10 Replies
Do you mean you want a Checkbox column based on whether the user has language_id 1 or not?
Sorry, the check was indeed open for interpretation. I meant a check icon from font-awesome.
My question is basically how to render something custom based on a condition. and how I should query for the condition.
Ah yeah, you could add a Placeholder that returns a html string
Allright, and any pointers on how to add the where query?
You could add a closure to the ->content(), for example:
would something like this work for you?
Yeah, but i already tried something like that. I think i have another issue. When i run the content method on either a TextColumn or Column. An error gets thrown that these methods don't exist.
Wait
it's in table?
So might have to check how it's installed. Already cleared cache and compiled views
yes
Try IconColumn
oh yeah that works.
i'll check the documentation to find out where to add the conditional logic