@extends('layouts.app')

@section('content')
<div class="container">
    <h2>Editar Rol</h2>

    <form action="{{ route('roles.update',$role) }}" method="POST">
        @csrf
        @method('PUT')

        <div class="mb-3">
            <label>Nombre del rol</label>
            <input type="text" name="name" class="form-control"
                   value="{{ $role->name }}" required>
        </div>

        <button class="btn btn-success">Actualizar</button>
        <a href="{{ route('roles.index') }}" class="btn btn-secondary">Cancelar</a>
    </form>
</div>
@endsection
