@extends('layouts.admin') @section('content')
صلاحيات المستخدم
{{-- {{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}} @if($role->hasPermissionTo($permission->table.'-create')) @endif @if($role->hasPermissionTo($permission->table.'-read')) @endif @if($role->hasPermissionTo($permission->table.'-update')) @endif @if($role->hasPermissionTo($permission->table.'-delete')) @endif
@endsection