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

Depends on return only ids #77

Closed
Eyad994 opened this issue Mar 21, 2021 · 1 comment
Closed

Depends on return only ids #77

Eyad994 opened this issue Mar 21, 2021 · 1 comment

Comments

@Eyad994
Copy link

Eyad994 commented Mar 21, 2021

BelongsTo::make('University', 'university', 'App\Nova\University'),
BelongsToManyField::make('University Campus', 'UniversityCourse', Campus::class)
->dependsOn('university', 'university_id')
->optionsLabel('name_en')
->setMultiselectProps([
'selectLabel' => 'click for select',
'closeOnSelect' => false,
])
->canSelectAll('Select All'),

            After select the university, response like this

Screenshot from 2021-03-21 15-22-26

The result in university campuses like this
Screenshot from 2021-03-21 15-24-26

How can I return the name_en instead of ids?

@Eyad994
Copy link
Author

Eyad994 commented Mar 22, 2021

I solve the problem by adding a name to $title in resource

@Eyad994 Eyad994 closed this as completed Mar 22, 2021
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

No branches or pull requests

1 participant