Are view shares / composers / creators optimized to work like a singleton? #36144
Unanswered
ProteanCode
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Imagine the following line:
View::share('*', [ 'usersCount' => User::query()->count() ]);
Would it make a query per rendered blade file, or would it store its value from the first call and reuse the result?
Beta Was this translation helpful? Give feedback.
All reactions