How to rename the label to Resource Test

0 votes
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.
Dec 3, 2020 in Laravel by kartik
• 37,510 points
836 views

1 answer to this question.

0 votes

Hello,

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.

answered Dec 3, 2020 by Niroj
• 82,880 points

Related Questions In Laravel

0 votes
1 answer

How to place the ~/.composer/vendor/bin directory in your PATH?

Hello @kartik, To put this folder on the ...READ MORE

answered Apr 2, 2020 in Laravel by Niroj
• 82,880 points
22,827 views
0 votes
1 answer

How to access url for the current if statement of laravel?

Hello @ subham , If you want to access the ...READ MORE

answered Aug 7, 2020 in Laravel by Niroj
• 82,880 points
982 views
0 votes
1 answer

How do I write to the console from a Laravel Controller?

Hello @kartik, This can be done with the ...READ MORE

answered Aug 11, 2020 in Laravel by Niroj
• 82,880 points
6,932 views
0 votes
1 answer

How to get the id when you're validating in the model Validation unique on update using laravel?

Hello @kartik, in Laravel's inbuilt auth system, the ...READ MORE

answered Sep 11, 2020 in Laravel by Niroj
• 82,880 points
6,292 views
+1 vote
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,880 points
21,867 views
0 votes
1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,880 points
2,678 views
0 votes
1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,880 points
2,538 views
+1 vote
1 answer

What are named routes in Laravel and How can specify route names for controller actions?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,880 points
41,705 views
0 votes
1 answer

How to identify wheather the request is HTTP GET or HTTP POST in Laravel?

Hey, In order to identify the type of ...READ MORE

answered Mar 19, 2020 in Laravel by Niroj
• 82,880 points
2,758 views
0 votes
1 answer

How Can I Set the Default Value of a Timestamp Column to the Current Timestamp with Laravel Migrations?

Hello, To create both of the created_at and updated_at columns: $t->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP')); $t->timestamp('updated_at')->default(DB::raw('CURRENT_TIMESTAMP on update ...READ MORE

answered Apr 2, 2020 in Laravel by Niroj
• 82,880 points
11,493 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP