Skip to content
Discussion options

You must be logged in to vote

Hi @erikn69, thanks for your answer.

I have doing some debugging and research and it seems that Laravel relationships are not available during the booted method, so that's why the hasRole('manager') fails to append the where clause. I am not 100 percent sure this is what is happening, but seems to be the case. For now, my solution was to do the query myself, not using the Laravel relations.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@erikn69
Comment options

Answer selected by strotgen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants