@extends('layouts.app') {{-- Customize layout sections --}} @section('subtitle', 'ROLES') @section('content_header_title', 'ROLES') @section('content_header_subtitle', 'NEW') {{-- Content body: main page content --}} @section('content_body') {{html()->form('POST', route('role.store'))->open()}}

NEW ROLE

{{html()->label('Role Name', 'name')}} {{html()->text('name')->class('form-control'.($errors->has('name') ? ' is-invalid' : ''))->placeholder('Role Name')}} {{$errors->first('name')}}
@if($errors->has('permissions')) Required @endif
@foreach($permissions as $group => $permission_arr)

{{$group}}

@foreach($permission_arr as $id => $permission)
{{html()->checkbox('permissions[]', false, $permission['name'])->class('custom-control-input')->id('permission'.$id)}} {{html()->label(ucwords($permission['name']), 'permission'.$id)->class('custom-control-label')}} {{$permission['description']}}
@endforeach
@endforeach
{{html()->form()->close()}} @stop {{-- Push extra CSS --}} @push('css') {{-- Add here extra stylesheets --}} @endpush {{-- Push extra scripts --}} @push('js') @endpush