@php
$modules = DB::table('gnr_module')->select('id','name','code')->get();
$subFunctions = DB::table('gnr_sub_function')->select('id','subfunctionName')->get();
@endphp
{{-- /////////// --}}
@foreach ($modules as $index => $module2)
@php
$functions = DB::table('gnr_function')->where('moduleIdFK',$module2->id)->select('id','name')->orderBy('name')->get();
@endphp
{{-- Print Functions --}}
@foreach($functions as $function)
{!! Form::label($function->name,$function->name,['class'=>'textBold']) !!}
{!! Form::checkbox('checkAll', null, false,['class'=>'checkAll']) !!}
{!! Form::label($function->name,'Check/Uncheck All') !!}
@foreach($subFunctions as $subFunction)
{!! Form::checkbox($function->name, $subFunction->id, false,['moduleId'=>$module2->id,'functionId'=>$function->id,'class'=>'checkItem']) !!}
{!! Form::label($subFunction->subfunctionName,$subFunction->subfunctionName) !!}
@endforeach
@endforeach
{{-- End Print Functions --}}
@endforeach