The issue with the code is that roles is a collection of roles, not a single role. Therefore, you need to loop through the collection to access each role's title. Here's an example of how to do it:
@foreach (Auth::user()->roles as $role)
@if ($role->title == "Admin")
// Do something
@endif
@endforeach
Alternatively, if you only want to check if the user has the "Admin" role, you can use the contains method:
@if (Auth::user()->roles->contains('title', 'Admin'))
// Do something
@endif