@extends('backend.layouts_backend.master2') @section('title') Add Role @endsection @push('styles') @endpush @section('content') {{-- title --}}

Add Role

@if (Auth::user()->can('role-list')) @endif
{{-- end title --}}
{!! Form::open(['route' => 'roles.store', 'method' => 'POST']) !!}
{{ Form::text('name', null, ['class' => 'form-control compulsory']) }}
@if ($errors->has('name')) @endif

Assign permissions to role


@if ($errors->has('permission')) {{-- {{ $errors->first('permission') }} --}} @endif
@foreach ($categories as $category) {{-- --}} @php $permissions = \App\Models\PermissionCategory::find($category->id) ->permissions; @endphp {{-- --}} @endforeach
# {{ __('roles.assign') }}{{ $category->name }}
  • {{ __('roles.viewing') }}
  • {{ __('roles.creating') }}
  • {{ __('roles.editing') }}
  • {{ __('roles.deleting') }}
  • {{ __('roles.other') }}
@foreach ($permissions->chunk(3) as $permission)
@foreach ($permission as $item)
{{ Form::checkbox('permission[]', $item->id, false, ['class' => "permission{$category->id}"]) }} {{ $item->description }}
@endforeach
@endforeach

{{-- {{ Form::button(__('Submit'), ['type' => 'submit', 'class' => 'btn btn-success waves-effect waves-light m-r-10']) }} --}}
{!! Form::close() !!}
@endsection @push('scripts') {{-- --}} @endpush('scripts')