DEV Community

Discussion on: Laravel Service Classes Explained

Collapse
 
klethonio profile image
klethonio

Hello, thanks for the content. I'm having trouble with selecting a table in de DB. My project has a global scope for schools and i'm trying to get all teachers from one school right in the service class (in your case CartService), but the global scope does not filters by school, the selection gets all teachers. I was testing a local scope and notice that session was not accessible, using session('school_id'). Can you light my way here?