Change Create Button Label
Is it possible to change the default button label that auto generates for default "Create" route on a model resource? The "New Strange Model Name" is awkward.
Note I'm not talking about button()->label() this is the "New Model" button that shows up in upper right side of a resource::index page
3 Replies
You can overwrite the getModelLabel function or the attribute
if you don't wanna use the label method
I'll use any method that works, but I'm not setting a button explicitly. This button is auto-created because it leads to the "create" resource
I don't see where to use
getModelLabel
method. it is not coming up in phpstorm
okay, i see... it's on the resource not the page
thanksThe Button is not auto-generated it is on the ListRecord page, you could use the label method there incase just overwriting the model label doesn't suit you :)