When you define a resource, Laravel Nova makes an educated guess regarding its URL slug. For example, the list of all OvalOfficeAddress
resources appears at /nova/resources/oval-office-addresses
.
But what if you prefer to display the list of Oval Office Addresses at /nova/resources/tweets
instead?
Not a problem. Just override the resource’s uriKey
static method, as follows:
class OvalOfficeAddress extends Resource
{
public static function uriKey()
{
return "tweets";
}
}