@extends('layouts/base_view')
@section('title')
<li class="breadcrumb-item">Configurations</li>
<li class="breadcrumb-item active">Permissions</li>
@endsection
@section('content')
<!-- Main content -->
<section class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                <div class="card card-outline card-warning">
                    <div class="card-header">
                        <h3 class="card-title">Edit data Permission</h3>
                    </div>
                    <div class="card-body">
                        <form method="POST" action="{{ route('permissions.update', $permission->id) }}">
                            @method('patch')
                            @csrf
                            <div class="form-group">
                                <label for="name">Permission Name</label>
                                <input name="name" value="{{ $permission->name }}" class="form-control form-control-sm form-control-lg" type="text" placeholder="" required>
                                @if ($errors->has('name'))
                                <span class="text-danger text-left">{{ $errors->first('name') }}</span>
                                @endif
                            </div>

                            <button type="submit" class="btn btn-outline-info btn-sm button-cek-permission" data-permission="permissions.update"><i class="fas fa-save"></i> Save</button>
                            <a href="{{ route('permissions.index') }}" class="btn btn-sm btn-outline-warning btn-sm"><i class="fas fa-arrow-left"></i> Back</a>
                        </form>

                    </div>
                    <!-- /.card-body -->
                </div>
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </div>
    <!-- /.container-fluid -->
</section>
@endsection