-
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathedit.blade.php
More file actions
42 lines (37 loc) · 1.76 KB
/
edit.blade.php
File metadata and controls
42 lines (37 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@extends('admin.layouts.app')
@section('title', 'Edit Permission')
@section('content')
<div class="container py-4">
<div class="card card-body">
<h4>Edit Permission</h4>
<form action="{{ route('permissions.update', $permission) }}" method="POST">
@csrf
@method('PUT')
<div class="mb-3">
<label for="name" class="form-label">Permission Name</label>
<input type="text" class="form-control" id="name" name="name" value="{{ $permission->name }}"
required>
</div>
<div class="mb-3">
<label class="form-label">Assign to Roles</label>
<div class="row">
@foreach ($roles as $role)
<div class="col-md-3 col-6">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="roles[]"
value="{{ $role->id }}" id="role_{{ $role->id }}"
{{ $permission->roles->contains($role->id) ? 'checked' : '' }}>
<label class="form-check-label" for="role_{{ $role->id }}">
{{ $role->name }}
</label>
</div>
</div>
@endforeach
</div>
</div>
<button class="btn btn-primary">Update</button>
<a href="{{ route('permissions.index') }}" class="btn btn-secondary">Cancel</a>
</form>
</div>
</div>
@endsection