-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I am really stuck on this still. Any help or alternate mechanisms to tackle this is appreciated. e.g. change the blade to contain an if statement to produce the icon in the view dynamically? |
Beta Was this translation helpful? Give feedback.
-
For information on how to sort see the docs: QueryBuilder Sorting For sort-dependent rendering, you can fall back to using the underlying app(QueryBuilderRequest::class)->sorts()->contains('id'); // ascending
app(QueryBuilderRequest::class)->sorts()->contains('-id'); // descending
app(QueryBuilderRequest::class)->sorts()->contains(function($value, $key) {
return in_array($value, ['-id', 'id']);
}); // no query defined sort for id was applied You can query for the sort order directly in your blade template or save it in the context and pass it to the blade template. |
Beta Was this translation helpful? Give feedback.
For information on how to sort see the docs: QueryBuilder Sorting
For sort-dependent rendering, you can fall back to using the underlying
QueryBuilderRequest
:You can query for the sort order directly in your blade template or save it in the context and pass it to the blade template.
From there you could use an if-else construct to dynamically apply classes or render icons.