Database query on every view
My app doesn't have authentication but still i see the following query being executed on every view when debugging with Clockwork
SELECT * FROM `users` WHERE `id` = '1' LIMIT 1
Any idea where that query is coming from.I suppose it may be a laravel middleware
@th3apprentis
which Laravel version are you using?
here are maybe reasons
- check your Kernel.php, maybe use any auth middleware
- check your Auth and App Provider
- check your controller file maybe you include any auth class
- check your model file
if you share some code that would be great
every view or every request ?
Any view composers?
it's loading the current user and is part of starting sessions in the web middleware
You say you have a user ... then you need it, otherwise they would be a guest
Please or to participate in this conversation.