list.blade.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @extends('layouts.admin.app')
  2. @section('content')
  3. <!-- Main content -->
  4. <section class="content">
  5. @include('layouts.errors-and-messages')
  6. <!-- Default box -->
  7. @if(!$roles->isEmpty())
  8. <div class="box">
  9. <div class="box-body">
  10. <h2>Roles</h2>
  11. <table class="table">
  12. <thead>
  13. <tr>
  14. <td>Display Name</td>
  15. <td>Description</td>
  16. <td>Actions</td>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. @foreach ($roles as $role)
  21. <tr>
  22. <td>
  23. {{ $role->display_name }}
  24. </td>
  25. <td>
  26. {!! $role->description !!}
  27. </td>
  28. <td>
  29. <form action="{{ route('admin.roles.destroy', $role->id) }}" method="post" class="form-horizontal">
  30. {{ csrf_field() }}
  31. <input type="hidden" name="_method" value="delete">
  32. <div class="btn-group">
  33. <a href="{{ route('admin.roles.edit', $role->id) }}" class="btn btn-primary btn-sm"><i class="fa fa-edit"></i> Edit</a>
  34. <button onclick="return confirm('Are you sure?')" type="submit" class="btn btn-danger btn-sm"><i class="fa fa-times"></i> Delete</button>
  35. </div>
  36. </form>
  37. </td>
  38. </tr>
  39. @endforeach
  40. </tbody>
  41. </table>
  42. {{ $roles->links() }}
  43. </div>
  44. <!-- /.box-body -->
  45. </div>
  46. <!-- /.box -->
  47. @else
  48. <p class="alert alert-warning">No role created yet. <a href="{{ route('admin.roles.create') }}">Create one!</a></p>
  49. @endif
  50. </section>
  51. <!-- /.content -->
  52. @endsection