You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like we can't implicitly bind something with a custom key in a Route::domain and equivalent.
Steps To Reproduce:
Create a model, Project, with a property, 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.
The text was updated successfully, but these errors were encountered:
felixdorn
changed the title
Subdomain Routing does not resolve an implicit ninding with a custom key
Subdomain Routing does not resolve an implicit binding with a custom key
Jun 15, 2020
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.
Description:
It looks like we can't implicitly bind something with a custom key in a
Route::domain
and equivalent.Steps To Reproduce:
domain
in my case.It works using only
{project}
but it uses the id, logic.It works using a custom binding :
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.
The text was updated successfully, but these errors were encountered: