Fixed issue where group with no permissions would crash view page

This commit is contained in:
snipe 2018-02-13 17:14:30 -08:00
parent 5484b06df8
commit 0d11e32523

View file

@ -42,12 +42,16 @@
</div>
<div class="col-md-3">
@if (is_array($group->decodePermissions()))
<ul class="list-unstyled">
@foreach ($group->decodePermissions() as $permission_name => $permission)
<li>{!! ($permission == '1') ? '<i class="fa fa-check text-success"></i>' : '<i class="fa fa-times text-danger"></i>' !!} {{ e(str_replace('.', ': ', ucwords($permission_name))) }} </li>
@endforeach
</ul>
@else
<p>This group has no permissions.</p>
@endif
</div>
</div>