-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Checklist error with pluck #3035
Comments
Hello there! Thanks for opening your first issue on this repo! Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that. Backpack communication channels:
Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch. Thank you! -- |
Hello @vamsi381 Sorry but i cannot follow your issue. What's the output of Line 15 does not have any pluck, my guess is that is related with line 17 where we have: if ($field['value'] instanceof Illuminate\Database\Eloquent\Collection) {
$field['value'] = $field['value']->pluck($key_attribute)->toArray();
} So that pluck will only be called if the field value is a collection, if it's a string we don't call. My guess is that you are using an outdated version, that might have that bug layin' around. Let me know. Pedro |
Hi @pxpm , Thank you very much. Thank you. |
Nice to know @vamsi381 Best, |
In my crud controller, There is one field called "roles (Multiple checklist)", While before saving the roles, I am converting array into string like 1,2,3 using implode. Ex: CrudController setUp() method
In Store method,
Edit Method looks like this,
If am trying to access, Edit page, I am getting below error,
ErrorException in line 15: Call to a member function pluck() on string (View: /var/www/html/app/vendor/backpack/crud/src/resources/views/fields/checklist.blade.php)
The text was updated successfully, but these errors were encountered: