@extends('layout.layout')

@section('content')
<div class="card shadow-none border">
  <div class="card-body p-24">
    <h5 class="mb-3">Edit Permission</h5>

    @if ($errors->any())
      <div class="alert alert-danger"><ul class="mb-0">@foreach ($errors->all() as $error)<li>{{ $error }}</li>@endforeach</ul></div>
    @endif

    <form method="POST" action="{{ route('admin.permissions.update', $permission) }}">
      @csrf
      @method('PUT')
      <div class="mb-3">
        <label class="form-label">Nama Permission</label>
        <input type="text" name="name" class="form-control" required value="{{ old('name', $permission->name) }}">
      </div>
      <button class="btn btn-primary">Simpan</button>
      <a href="{{ route('admin.permissions.index') }}" class="btn btn-secondary">Batal</a>
    </form>
  </div>
</div>
@endsection

