coderello / laravel-shared-data

📦 An easy way to share the data from your backend to the JavaScript.
https://coderello.com/docs/laravel-shared-data/1.0/sharing-data
MIT License
321 stars 22 forks source link

fixed the issue where config options returning null. #21

Closed ScriptingBeating closed 4 years ago

ScriptingBeating commented 4 years ago

This PR fixes the #19 issue where the config options were returning null instead of an array.

hivokas commented 4 years ago

As I understand it doesn't solve the #19. It is just a workaround, isn't it?

ScriptingBeating commented 4 years ago

I checked the code in Linux as well as windows there was no problem with Directory Separator, the config variable is type hinted as an array in SharedData Class so clearly it can't accept null. And it is having a null value because the user doesn't have the config file published because that's optional.

hivokas commented 4 years ago

@ScriptingBeating but, if I'm not mistaken, Laravel merges the default config and the published one. No?

ScriptingBeating commented 4 years ago

@hivokas yes you are right. I just cleared the cache and that solved the problem. Hmm...