After publish file takes another array format
See original GitHub issueI mean i have in files lines like so:
'account.user' => '/user',
'account.user.step.two' => '/user-step-2',
'account.user.step.three' => '/user-step-3',
In DB all lines are stored. But after publish it the file looks like:
'account' => [
'user' => [
'step' => [
'two' => '/user-step-2',
'three' => '/user-step-3'
]
]
],
And in this time my first line goes lost. Is there any config that do the thing and export/publish key-value from DB in another format? #
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Populating another array from array - Javascript - Stack Overflow
Very simple thing I am trying to do in JS (assign the values of one array to another), but ...
Read more >PHP | $_FILES Array (HTTP File Upload variables)
After we are done with uploading a file, in the script we will check the request method of the server, if it is...
Read more >POST method uploads - Manual - PHP
This function deals with whatever dimension of upload metadata. I kept the code extremely simple, it doesn't validate anything in $_FILES, etc... AND...
Read more >Arrays - Learn web development | MDN
In the final article of this module, we'll look at arrays — a neat way of storing a list of data items under...
Read more >Importing Image Data into NumPy Arrays | Pluralsight
Here the function takes the path and the file name where we want to save the image data in NumPy array format. This...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gerardreches, the dot notation by convention is used to separate arrays. The issue is that on publishing the dot convention is always interpreted as array convention. The code to ignore the array convention when a key has a value assigned that would be overwritten by an array gets to be convoluted.
Would it be possible for you to use another delimiter than a period
.
so it does not conflict with the translation array notation, for example a dash-
would do the trick.@vsch I’m in the same problem right now.
I have some translations for routes. One of these routes (
/services
) is for a services page, so I called the stringroutes.services
. The thing is that the services page is a top level for the different services:/services/testimonials
/services/transactions
/services/estate
and more… So the strings areroutes.services.testimonials
,routes.services.transactions
,routes.services.estate
, and so on.When I publish the
routes
group, it shows meand my laravel project shows a
trim()
error until I delete the generated translations.I know that this is logic, because there are two equal keys with different values: one contains a string, and the other contains an array.
Is there some workaround for this? Or the only option is to rename the
routes.services
key?