@extends('layouts.admin') @section('content')
@csrf @method("PUT")
صلاحيات المستخدم
{{-- {{dd($permissions)}} --}} @foreach($permissions as $permission) @php $sub_permissions = \Spatie\Permission\Models\Permission::where('table',$permission->table)->get(); @endphp @if($sub_permissions->where('name',$permission->table.'-create')->first()) @else @endif @if($sub_permissions->where('name',$permission->table.'-read')->first()) @else @endif @if($sub_permissions->where('name',$permission->table.'-update')->first()) @else @endif @if($sub_permissions->where('name',$permission->table.'-delete')->first()) @else @endif @endforeach
الجدول اضافة عرض تعديل حذف
{{$permission->table}}
hasPermission($permission->table.'-create')) checked @endif name="permissions[]">
hasPermission($permission->table.'-read')) checked @endif name="permissions[]">
hasPermission($permission->table.'-update')) checked @endif name="permissions[]">
hasPermission($permission->table.'-delete')) checked @endif name="permissions[]">
@endsection