Exception
Property [Id_pet] does not exist on the Eloquent builder instance

Photo by Jess Bailey on Unsplash

Exception Property [Id_pet] does not exist on the Eloquent builder instance

Laravel 9

This error has occurred because the controller was unable to find the primary key of the table with the command

$petstore = Petstore::find($Parameter)

So instead of find() I'll use where();

$petstore = Petstore::where('$primarykey','$parameter')->first();