| Right but I'm telling you that you're worrying about the wrong thing, if that makes sense. The truth is that engineering is very opinionated, and you've picked an opinionated framework. I don't know php/laravel, but I've worked on Rails/Elixir/etc frameworks. Having interviewed juniors in technical rounds, I'm telling you that the more important thing for you (I take it you're a fresh junior?) is to understand the framework's conventions and be able to navigate that well enough. Can you code in php? Once you're on the job, you'll find that those conventions tend to go out the door when there's actual money on the line, so the best you can do is be aware and on top of it. Also, to be honest, without knowing php/laravel, the best I can do while I'm on my phone (take it or leave it, or use Claude/AI - I am self taught and nobody code reviewed me when I started) - Return custom errors instead of strings. Like NotFoundError, ForbiddenError, etc. This way you have some consistency, and you can include like code, message or whatever fields for better API user experience - If there are no Products, just return an empty list instead of a string like "No products found" - When you delete you can just return the ID or even nothing (just a 200 OK) - Use proper http codes. I'm not sure if laravel handles that automatically, or you need to do like 201 for create, for example. Anyway good luck man, if you're new you're in for a world of wonder :-) Also try any Php/Laravel Slack/Discord communities too. They will be more helpful! |