Show the component class as well
Nov 3, 2021
5
Level 63
Call to a member function getQueueableRelations() on bool
Hello,
In a Livewire component ...
I have authors with roles (author, illustrator, co-author, ...), I can add as many roles as I want in the database.
To add / edit an author, I have to check the right roles.
I have this view.
@foreach ($roles as $index => $role)
<div wire:key="role-field-.{{ $index }}" class="form-check">
<input wire:model="author.roles.{{ $index }}" class="form-check-input" type="checkbox" value="{{ $role->id }}" id="role.{{ $index }}">
<label class="form-check-label" for="role.{{ $index }}">{{ $role->name }}</label>
</div>
@endforeach
When I check a checkbox, all is ok.
When I uncheck a checkbox, I have this error.
Call to a member function getQueueableRelations() on string
I don't understand what string it is ...
Do you have any idea ?
Thanks for your help.
Vincent
Level 63
I have a solution.
I use a public selectedRoles array which contains the ids of the selected roles and I bind it in the view. It works fine.
Please or to participate in this conversation.