Open ml-milan-vit opened 4 years ago
Additional points:
Bad points:
Final score:
Thank you so much for your efforts! I hope the project was as fun for you to make as it was for me to review.
I think there are things that could be improved, both from a stylistic point of view, as well as the architectural point of view. Please donāt misunderstand me, I think this was a valiant first step in the wonderful world of Laravel (and a dreadful world of PHP š¤£), but there are definitely things that Iād wish to see improved. May I recommend watching tutorials at Laracasts website, as well as perhaps looking at other projects that were parts of this study program? Getting inspired by one another is a wonderful thing, after all š¤©
Hi! Apologies for the late response. Please don't worry! We appreciate your honest feedback and will work on the points you shared. Thank you very much for taking the time :)
Hello, thank you so much for your efforts! š
Throughout the day, Iāll be going through the code repository and gathering my thoughts here. For the record, I was going through the
dev
branch as that one seems to contain the most recent commits. The final score will be issued after evaluating projects from other groups, to keep the excitement in the air š¤£Good points:
LoginController
, I like that the JSON keys are stored as constants. I think that if the number of returned fields grew significantly, using an associative array would be better to reduce the number of constants, but here I kind of like it as it is.RegistrationFormRequest
! Although, it could also include a custom method to directly return an instance of newUser
with the data populated, couldnāt it? It would look cleaner, as opposed to storing the conversion logic in the controller.fillable
fields in models!Interesting points:
UserController
, thegetUsers
method seems to return all usersā¦ That might be fine in this assignment, but donāt forget about pagination in the real projects! Other similar methods also lack paginationā¦UserController
, am I correct to assume that any user can delete any other user? I donāt see any sort of role-checking, am I missing something? š¤ I mean, there are user roles in this project for sure, but I canāt find any sort of middleware that would actually check them š¤Bad points:
LoginController
, it seems that$loginAfterSignUp
variable controls the flow. It wouldāve been better to control it via an environmental variable (env variable ā”ļø config ā”ļø controller) so that the flow can be easily changed by just adjusting the env variable, without a need for a code-level change.print
-based logging for LaravelāsLog
facade so that it can be easily silenced, highlighted or centrally redirected to a proper channel. I think it would be useful to get into the mind-set of always usingLog
, even for temporary debugging purposes.UserController
combines spaces, tabs (L46-48), empty lines with white-space (L61), white-space at the end of the line (L58), say whaaaat š± Sorry, Iām crazy about proper formattingā¦ Speaking of which, some of the lines inUserController
go against the PSR-2 formatting guide, like line L55ā¦UserController
āsget
andupdate
methods could be using route model binding for simpler and more readable code. I think the same improvement could be used elsewhere as well.