Laravel's example...
Route::group(['domain' => '{account}.myapp.com'], function () {
Route::get('user/{id}', function ($account, $id) {
//
});
});
Your code
Route::group(['domain' => 'admin.localhost'], function () {
Route::get('/', function () {
return view('welcome');
});
});
If you look at the laravel example it gets the parameter $account in the route, this way we can route according to this variable. This can then be applied to the group or any route's in it..
That said, if it's not something driven by your database and you just want it with admin subdomain i would personally do this as a nginx config.
If you want to test nginx locally (easier) i personally recommended doing development with docker.
Hope this answers your question, if not let me know and ill try to answer for you.