//Blade Page
@foreach ($permission as $permissions)
<tr>
<td class="text-center"></td>
<td></td>
@foreach ($role as $roles)
<td class="text-center">
@if ($roles->name == 'admin'|| $roles->name == 'superadmin')
<span class="feather feather-check text-success icon-style-circle bg-success-transparent"></span>
@else
@csrf
<input type="hidden" name="name" class="role" value="">
<input type="hidden" name="role_id" class="role_id" value="">
<input type="hidden" class="permissionid" name="permission[]" value="">
@foreach ($permissionrule as $item)
@if ($loop->index)
@if ($item == null)
<a href="javascript:void(0)" class="access-icon role1" id="checked1" ><span class="feather feather-x text-danger icon-style-circle bg-danger-transparent"></span>
@else
@if ( $item->permission_id === $permissions->id && $item->role_id === $roles->id)
<a href="javascript:void(0)" class="access-icon role" id="checked" ><span class="feather feather-check text-success icon-style-circle bg-success-transparent"></span></a>
@else
<a href="javascript:void(0)" class="access-icon role1" id="checked1" ><span class="feather feather-x text-danger icon-style-circle bg-danger-transparent"></span>
@endif
@endif
@endif
@endforeach
@endif
</td>
@endforeach
</tr>
@endforeach
public function rolesss(){
$role = Role::get();
$data['role'] = $role;
$permission = Permission::get();
$data['permission'] = $permission;
$permissionrule = DB::table('role_has_permissions')->get();
$data['permissionrule'] = $permissionrule;
return view('admin.roles.index')->with($data);
}
When I creating the role permission and giving to access to the role. Is not changing the status. How can I change the status? Please check the image to tell me anybody know the information about roles and permission.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3zPMXqp
via IFTTT
Aucun commentaire:
Enregistrer un commentaire