<html>
<x-head />

<body class="body">
    <x-header />

    <div class="main">
        <div class="container">
            <section id="menu">
                <li>
                    <h3>Изменение данных абонента</h3>
                </li>
                <li>
                    <form action="{{Route('editabonent', $ab->id)}}" method="POST">
                        @csrf
                        <input type="text" name="nameEdit" placeholder="Имя" value="{{$ab->user->name}}"><br>
                        <input type="text" name="lastEdit" placeholder="Фамилия" value="{{$ab->user->lastname}}"><br>
                        <input inputmode="tel" min="1" max="12" name="numberEdit" placeholder value="{{$ab->user->number}}" maxlength="12"><br>
                        <!-- <input type="text" name="tariffEdit" placeholder="Тариф" value="{{$ab->tariff->name}}"><br> -->
                        <select name="tariffEdit">
                            @foreach ($trfs as $trf)
                            <option value="{{$trf->id}}" @if($trf->id == $ab->tariff_id) selected @endif>{{$trf->name}}</option>
                            @endforeach
                        </select>
                        <input type="submit" class="but" value="Изменить">
                    </form>
                </li>
            </section>
        </div>
    </div>
</body>

</html>