Let's say that I have a resource called "Resource_test". When I'm displaying that resource in Nova, that resource name (or "label") displays the name as-is which obviously isn't very user-friendly.
Is it possible to rename the "label" to "Resource Test" (without the underscore for example)?
It seems like they set the name in the file src\Nova.php
on the static function resourceInformation
but even though I change the name there, it doesn't seem to change the name on the site itself...
You can override the static label method within the resource class like this:
public static function label() { return 'Your own label'; }
You'll find your resource classes in the app/Nova
directory. Do not confuse these classes with the identically-named models! Adding the label
method to the model will not work.
You can take a look at the Nova\src\Resource.php
class to view all the options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With