Комментарии:
This is way far from being clean PHP
- You get request data from a "service" --> you always inject into objects and validate data --> what you are not doing also
- You write a comment for each line
- You use "service" --> a symfony way of putting things into a class without organisation --> you should have a class to export the data, a class to write the file (please use laravel filesystem also whats the point of using a framework if you don't use it ?)
I'm not going further but keep going, you have many things to learn and you seems to be passionated 😃
This why sometimes php code sucks, because of bad advice
Ответить