-
Notifications
You must be signed in to change notification settings - Fork 322
Closed
Description
- Octane Version: 0.4
- Laravel Version: 8.40.0
- PHP Version: 8.0.3
- Server: RoadRunner
- Database Driver & Version: SQLite 3
More than a bug, is just a question. Does Laravel Octane flushes global scopes? I tried to find a call to Model::clearBootedModels() (which is done when the DatabaseServiceProvider registers) or a code for clearing the model scopes.
In case scopes are not cleared, this may break application that rely on dynamically scoping Models based on the request itself.
public function handle(Request $request, Closure $next)
{
if ($user = $request->user()) {
PrivatePhotos::addGlobalScope(new OwnedPrivatePhotos($user);
}
return $next($request);
}Please close if I'm meando outside the tiesto.
terranc
Metadata
Metadata
Assignees
Labels
No labels