Skip to content

Code documentation + Gates optimizations #136

@AxelDeneu

Description

@AxelDeneu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions