Str::swap() #38884
Unanswered
khalyomede
asked this question in
Ideas
Str::swap()
#38884
Replies: 1 comment 1 reply
-
Why though? You can already do exactly this with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
Recently I needed to inject a bunch of data in a string, and I really did not liked the way it looked because of all the string interpolation that made the string not easily readable.
So I thought I would bring the same "experience" we have when using
trans()
by replacing placeholders:All credits to this method: https://github.com/laravel/framework/blob/8.x/src/Illuminate/Translation/Translator.php#L206-L230
Now I can finally make my strings look nicer:
What you guys think? Can this be useful for you? I'm eager to make a PR if you guys are interested 🤓
Beta Was this translation helpful? Give feedback.
All reactions