Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally override resource label #67

Open
wants to merge 3 commits into
base: 3.x
Choose a base branch
from
Open

Conversation

maukoese
Copy link

@maukoese maukoese commented Jan 6, 2025

By default, Quick Create will create the label from the resource's model name. We can override this by providing an optional getQuickCreateLabel() method in the resource class.

Allow customization of Quick create resource label by providing a helper function.
Add docs to customize the resource label
Update docs
@maukoese maukoese changed the title Optionammy override resource label Optionally override resource label Jan 6, 2025
@awcodes
Copy link
Owner

awcodes commented Jan 15, 2025

Can you help me to understand why there would be a need to change the label instead of reading it from the resource? Ie, why it would be different than what shows in the navigation.

@maukoese
Copy link
Author

I had describe this in full in a discussion thread, with images attached; but of the cuff, some terms can be reserved (e.g Model, Policy, etc) so it could be named differently in Eloquent (ModelProfile, PrivacyPolicy) and the developer might want it to read differently.

In my specific case I have Driver, Customer and Broker resources - all of which use the User model, but should be labelled differently.

It's optional, and if someone doesn't want to customize they can opt not to use the feature.

@awcodes
Copy link
Owner

awcodes commented Jan 16, 2025

Sorry, I didn't recall the discussion. I'll review as soon as I can.

@maukoese
Copy link
Author

Awesome, thank you.

Looking forward to seeing the changes, and/or answering any questions you have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants