@extends('layouts/gnr_layout') @section('title', '| New App Role') @section('content')
New App Role
{!! Form::open(array('url' => '', 'role' => 'form', 'class' => 'form-horizontal form-groups', "id"=>"create_form")) !!}
{!! Form::label('Role', 'Role:', ['class' => 'col-sm-2 control-label']) !!}
{!! Form::label('module', 'Modules:', ['class' => 'col-sm-2 control-label']) !!}
@foreach ($modules as $index => $module2)
@php $functions = DB::table('app_modules')->where('module_id_fk',$module2->id)->select('id','name')->orderBy('name')->get(); @endphp
{!! Form::checkbox('checkAll', null, false,['class'=>'checkAll',"style" => "margin-left: 5px"]) !!} {!! Form::label($module2->name,'Check/Uncheck All') !!}
@foreach($functions as $function)
{!! Form::checkbox("modulesIds[]", $function->id, false,['moduleId'=>$module2->id,'functionId'=>$function->id,'class'=>'checkItem']) !!} {!! Form::label($function->name,$function->name) !!}
@endforeach
@endforeach
{{-- form-group --}}
{!! Form::label('description', 'Description:', ['class' => 'col-sm-2 control-label']) !!}
{!! Form::submit('Submit', ['id' => 'submit', 'class' => 'btn btn-info']) !!} Close
{!! Form::close() !!}
@endsection @include("gnr.tools.appSetting.role.script")