Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 Laravel 的新手,这是我的第一个 API。我使用 Laravel Passport 进行身份验证。有什么优雅的方法可以在控制器中获取经过身份验证的客户端?我需要根据客户端加载不同的数据。
您可以Auth::user()像使用标准身份验证一样获取经过身份验证的用户
Auth::user()