Skip to content

Instantly share code, notes, and snippets.

Created May 9, 2016 21:46
What would you like to do?
<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 value="{{ $permission->id }}">{{ $permission->display_name }}</option>
<small><code class="permission_description">{{ $permission->description }}</code></small>
$(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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment