@inject('departments', 'Elearn\Services\Departments') @lang('backend.ph.select_teams'): {!! Form::checkbox('select_all', 'all', null, ['class' => 'checkbox all', 'id' => 'all']) !!} {!! Form::label('all', trans('backend.titles.select_all')) !!}
@foreach($departments->get() as $department)
{!! Form::checkbox('select_all_options_tab', 'all_options_tab', null, ['class' => 'checkbox all-options-tab', 'id' => 'tab-'.$department->id]) !!} {!! Form::label('tab-'.$department->id, trans('backend.titles.select_all_teams')) !!}
@foreach($department->teams as $team) @if((isset($user) AND $user->teamExists($team->id)) OR (isset($plan) AND $plan->teamExists($team->id))) {!! Form::checkbox('teams[]', $team->id, true, [ 'class' =>'checkbox tab-'.$department->id, 'id' => $team->id]) !!} @else {!! Form::checkbox('teams[]', $team->id, null, [ 'class' => 'checkbox tab-'.$department->id, 'id' => $team->id]) !!} @endif {!! Form::label($team->id, $team->title) !!} @endforeach
@endforeach