We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf56130 commit 17c6134Copy full SHA for 17c6134
1 file changed
src/Views/admin/agent/form_edit.blade.php
@@ -28,7 +28,7 @@
28
></td>
29
<td><input id="checkbox_agent_{!!$agent->id!!}_cat_{!! $agent_cat->id !!}_auto" name="agent_cats_autoassign[]"
30
type="checkbox"
31
- value="{{ $agent_cat->id }}" {!! ($agent->categories->whereIn('id',$agent_cat->id)->first()['pivot']['autoassign']==0) ? "" : "checked=\"checked\"" !!}
+ value="{{ $agent_cat->id }}" {!! ((!$agent->categories->first(function($q) use($agent_cat) { return $q->id == $agent_cat->id;}) || $agent->categories->whereIn('id',$agent_cat->id)->first()['pivot']['autoassign']==0)) ? "" : "checked=\"checked\"" !!}
32
{!! (count($agent->categories->whereIn('id',$agent_cat->id)) == 0) ? "disabled=\"disabled\"" : "" !!}
33
34
0 commit comments