4 months ago

Can not get lang file changes to reflect on prod server

Posted 4 months ago by Sjon

Hi, I have wrote controller code that directly writes to the lang files (also creates them if they do not exist) in the resources folder. Then it reflects these changes in the blade views, where I simply output lang content.

On local testing this whole process works fine. But when pushed to the prod server, it only works the first time (when the function creates a new lang file). After that, I can edit the content in these lang files through the controller function, and the lang files themselves actually receive the changes on the server.

However, these changes are not reflected in the views. The server keeps using the old first version of the lang files (when it was created through the controller function).

So the problem is not with the code but probably with the caching on the server or in laravel.

Clearing cache with artisan command does not solve the problem.

Anyone know what could be causing this?


Please sign in or create an account to participate in this conversation.