This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="col-sm-10"> | |
<select class="form-control" onchange="event()"> | |
@foreach($group->permissions as $permission) | |
@if ($role->hasPermission($permission->name)) | |
<option selected value="{{ $permission->id }}"> | |
{{ $permission->display_name }} | |
<span>{{ $permission->description }}</span> | |
</option> | |
@else | |
<option value="{{ $permission->id }}">{{ $permission->display_name }}</option> | |
@endif | |
@endforeach | |
</select> | |
<small><code class="permission_description">{{ $permission->description }}</code></small> | |
</div> | |
<script> | |
$(function() { | |
function event() { | |
// here I want to update the nearest .permission_description with the permission object's description, but I don't really have access to that... | |
// Don't know if I should just pass $permission as the value and utilize that way? | |
} | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment