Skip to content
Discussion options

You must be logged in to vote

First i don't understand why that code is on Controller constructor, that must be on sedder or migration , also you always are cleaning cache, that makes cache useless, maybe middleware on route executes before than the controller, hard to say because I wouldn't use the code like that in any situation.

You can use syncPermissions for avoid so many if/else, also there is firstOrCreate method

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
2 replies
@franciscoarnaldog
Comment options

@franciscoarnaldog
Comment options

Comment options

You must be logged in to vote
6 replies
@franciscoarnaldog
Comment options

@erikn69
Comment options

@franciscoarnaldog
Comment options

@erikn69
Comment options

@franciscoarnaldog
Comment options

Answer selected by franciscoarnaldog
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants