route('accountindex', $account) <-- Could you try to add the $account variable there (or whatever you call it in your view)
So a link would be:
<a href="{{ route('accountindex', $account) }}">Link to account</a>
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
This is my routes, a example is also here: https://laracasts.com/discuss/channels/laravel/how-to-set-correct-route-for-subdomain-homepage
Route::group(['domain' => 'maindomain.dev'], function () {
Route::get('/', function () {
return view('welcome');
})->name('websitehome');
});
Route::group(['domain' => '{account}.maindomain.dev'], function () {
Route::get('/', function () {
return view('accountindex');
})->name('accountindex');
});
if I use in blade route('websitehome') it works, it's from route domain, but if I want to get route from subdomain like route('accountindex') then I get this error msg.
ErrorException in UrlGenerationException.php line 17: Missing required parameters for [Route: accountindex] [URI: account].
What is here to add to route()?
Please or to participate in this conversation.