You can resolve the authenticated user in the component class by using the Auth facade in the mount method of the component. The mount method is called once when the component is first rendered.
class MyComponent extends Component
{
public $user;
public function mount()
{
$this->user = Auth::user();
}
public function render()
{
return view('my-component', [
'user' => $this->user
]);
}
}
In this example, the authenticated user is resolved in the mount method and stored in the $user property. The $user property can then be accessed in the view for the component.