Courses

Laravel Multi-Tenancy: All You Need To Know

Filter Model By user_id: With where() and Global Scope

avatar

This is really cool and I like the approach with the global scope very much. But what if an Admin signs in, that is able to see a list of all projects?

avatar

You can add an if statement at the scope, that if the user is admin then not apply the global scope.