Skip to content

Export only selected columns #1226

Closed Answered by lrljoe
RuLeiFei asked this question in Q&A
May 23, 2023 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

To reverse a slug, you'll need the Str helper included, but this should work:

Str::title(str_replace('-', ' ', $slug)

If not, I'll take a closer look later this week.

Otherwise, in the interim, just have an array mapping the slug to proper column name in your export class, and pluck out the proper column names for your select.

Replies: 2 comments 4 replies

Comment options

lrljoe
May 23, 2023
Collaborator Sponsor

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@lrljoe
Comment options

lrljoe May 23, 2023
Collaborator Sponsor

@RuLeiFei
Comment options

@lrljoe
Comment options

lrljoe May 23, 2023
Collaborator Sponsor

Answer selected by RuLeiFei
@RuLeiFei
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants