Closed
Description
Laravel Version
10.34.2
PHP Version
8.2.12
Database Driver & Version
8.2.0
Description
sanctum version : 3.3.2
Hi, I use Laravel with Sanctum, and I've noticed that the app runs a query each time I use request()->user()
I found that if the saved token is incorrect or doesn't exist in the database, the user resolver runs a query each time it is called, and this is not good for performance.
Steps To Reproduce
you can run a fresh Laravel app with sanctum and set wrong token in Bearer token that not exist and use request()->user() for times.
I check app and query log with Clockwork browser extension.