@extends('main') @section('content')

Add Role

@if(isset($role)) {!! Form::model($role, ['method' => 'PATCH', 'action' => ['RoleController@update', $role->idRole], 'class' => 'form-horizontal']) !!} @else {!! Form::open(['url' => 'roles', 'class' => 'form-horizontal']) !!} @endif
{!! Form::text('name',null,['class' => 'form-control','pattern'=>'^[^-\s][a-zA-Z_\s-]+$','onkeypress'=>'return lettersOnly(event)','minlength'=>'2','maxlength'=>'80','autocomplete'=>'off']) !!} @if($errors->has('name'))

{{ $errors->first('name') }}

@endif
{!! Form::text('label',null,['class' => 'form-control','autocomplete'=>'off']) !!} @if($errors->has('label'))

{{ $errors->first('label') }}

@endif
{!! Form::submit('SAVE',['class' => 'btn btn-raised btn-primary btn-round waves-effect']) !!} {!! Form::close() !!}

List Of Roles

@foreach($roles as $role) @endforeach
S.No. Name Action
{{ $i }} {{ $role->label }} Edit
@stop @section('script') @stop