@extends('admin.layouts.master') @section('title', $role->exists ? 'تعديل دور' : 'دور جديد') @section('page-header')
الأدوار

{{ $role->exists ? 'تعديل: '.$role->name : 'دور جديد' }}

@endsection @section('content')
@csrf @if($role->exists) @method('PUT') @endif

الصلاحيات

@php $grouped = $permissions->groupBy(function($p) { $parts = explode('-', $p->name, 2); return $parts[1] ?? 'general'; }); @endphp @foreach($grouped as $group => $perms)
{{ $group }}
@foreach($perms as $perm)
@endforeach
@endforeach
@endsection