Answer the question
In order to leave comments, you need to log in
Does doctrine or symfony have analogue of laravel's GlobalScope?
I have a division into workspace in my application.
Each user has access only to the workspace to which he is attached. The workspace itself is stored in the user.
And when I need to get, for example, a list of projects, but in general, when I access each entity, I need to select initially by workspace.
$this->repo->createQueryBuilder('m')
->select('*')
->where('t.workspace_id = :id')
->setParameter(':id', $user->id)
->getQuery();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question