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);
}
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 theDatabaseServiceProvider
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.
Please close if I'm meando outside the tiesto.