chris-ware / nova-breadcrumbs

Breadcrumbs for Laravel Nova
152 stars 44 forks source link

fix broken fetch due to GET params #113

Closed mstaack closed 3 years ago

mstaack commented 3 years ago

Finding a resource by ID failed currently for me due to:

SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for type bigint: "1003?tab=Company" (SQL: select

being called in NovaBreadcrumsController:

$this->findResourceOrFail($pathParts->get(2))

but $pathParts->get(2) returned a string like "1003?tab=Company"

So this basically removes get params from the supposed to be resourceId.

mstaack commented 3 years ago

related to https://github.com/chris-ware/nova-breadcrumbs/pull/112

mstaack commented 3 years ago

@chris-ware do you mind having a look at this get-params issue?

chris-ware commented 3 years ago

@mstaack Yes, I will. I see there are 3 different pull requests dealing with this issue in very different ways, and I'd actually like to take a look at another way, using native PHP functions to cover it off rather than the approaches that have been taken. I'm hoping to get a new release done before the end of the week.

chris-ware commented 3 years ago

@mstaack I've implemented this a bit differently, using updated stringable mechanics to make this work which is much clearer.

mstaack commented 3 years ago

thanks, working fine now!