Resource with another name besides "$record".

How can I use another variable name in my EditRecord class, other than "$record"? I get an error when I try to do this in the
getPages()
method:

            'edit' => Pages\EditLocation::route('/{location}/edit'),


I guess it's looking for record specifically. However, I have a class that checks for a "location" route in the request and I need it to specifically check this. OR I need it to be able to see if
{record}
is an instance of
Location
, but it seems that
{record}
is just a string or an Int, so I don't think that's possible. If anyone knows a way around this, that would be helpful.
Was this page helpful?