What makes it a good code
Repositery pattern (Design Pattern). Functional Programming. Dependency injection nullable handling php return types (somehwhere)
What makes it a bad code accessing direclty values from env solid priniciple violation fromrequsts or validations were missing
What was missing and was updated formerquests route model bindings traits for reusable code exception hanlding in controller usage of findorfail added php typehinting highorder function useage useage of validated data only in controller passing only validated data to repo data sorting should be in request