Why you decided you have an error in your database query? The error is saying you are using an object of class stdClass as a string in your resources/views/admin/users/index.blade.php file.
You can use dd($usernames); right after the query to verify it's running as expected. But most probably it is, check your view file and see where you use a variable as a string. If you need help, copy/paste your resources/views/admin/users/index.blade.php file and we may point you where the error may be.