It looks like we can't implicitly bind something with a custom key in a Route::domain and equivalent.
domain in my case.Route::domain('{project:domain}.app.wip')->group(function () {
Route::get('/', function (Project $project) {
dd($project);
});
});
It works using only {project} but it uses the id, logic.
It works using a custom binding :
Route::bind('projectDomain', function ($domain) {
// return the project based on the domain
});
I don't know if I missed something, or it's a bug, the documentation does not talk about this specific case (I didn't found relevant tests for this) but I might be blind.
I went deep into the rabbit hole on this one but couldn't figure it out. It indeed doesn't works and I'd also expect it to should work. I can't pinpoint where the matching with the dynamic subdomain route is taking place. Gonna ping @taylorotwell to see if he knows.
Most helpful comment
I went deep into the rabbit hole on this one but couldn't figure it out. It indeed doesn't works and I'd also expect it to should work. I can't pinpoint where the matching with the dynamic subdomain route is taking place. Gonna ping @taylorotwell to see if he knows.