phpip icon indicating copy to clipboard operation
phpip copied to clipboard

Code documentation + Gates optimizations

Open AxelDeneu opened this issue 6 months ago • 6 comments

Hello @jjdejong

I can see that the overall project is missing some code comments, not mandatory but it should help every future contributor to better understand some of the aspects of phpip. Do you mind if I submit a pull request with some comments addition?

Also, I see with the commit a4c4764 that you refactored the authorization system. I think we could also put each gate in a middleware and add it to the route definition. In my opinion, it could be more readable and prevent code duplication in the controller's methods where we can read a lot of Gate::authorize('XXXXX'). What do you think? We could also create a dedicated ServiceProvider to register the gates?

Obviously, I will contribute if you're ok with all of this.

AxelDeneu avatar Aug 08 '24 13:08 AxelDeneu