Closed illmatic closed 7 years ago
You could either do an "allTenants()" or overwrite the built in "firstOrFail", just as this package overwrites "findOrFail". If it's for getting the row, i'd suggest using the built in "findOrFail" that this package overwrites.
Otherwise, it may be easier to just make a separate query to look it up, if you don't want to make a pull-request or fork it yourself :)
I ran into a route model binding issue with my Tenant Middleware so I decided to forego that. I'm also using a Sluggable package and don't want my URLs to show the index value. I tried firstOrFail with a slug condition but it simply returned a ModelNotFoundException.
Is there any way to make this work beyond doing an extra query to look up the ID based on slug?