I don't see any harm in doing that. (as long as the query is small) The middleware will be called once every request and you will be calling the db in that request anyway.
What are you trying to do in the middleware ?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community