So.. I'm creating my first package. My package is pretty simple, it's about making payments with a popular norwegian / scandinavian solution.
I'm pretty new to Laravel (1.5 years). The code is working, I've followed every points on the API checklist. And all is good.
But, I keep thinking, does the code look good? Am I doing something stupid? Am I naming variables, classes and so on correct? Could this be done in a smoother way? And the list goes on..
How the hell do you cope with this? Is it just me..or..?
If you're worried about it you could try using phpstan and laravel pint, that would give you a consistent style. And maybe you could opensource it so maybe someone will review it
I think eventually you just accept that you're never going to get it totally right. You're always going to look back on your previous work and see things that could be improved. You'll learn about new/better ways of doing things and you'll have discovered them too late for your first implementation.
I'd be more worried if I wasn't thinking about whether my code looks good or whether there's a smoother way. If I'm totally satisfied with my work, it probably means I've stagnated
I have had this feeling as well. Don't feel that it has to be perfect the first time. Remember that you can always gradually refactor it and improve it over time.