| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- @extends('layout.app')
- @section('title', 'Отправка данных')
- @section('content')
- <h1>Отправка данных</h1>
- @if (session('success'))
- <div class="alert-success">
- {{ session('success') }}
- </div>
- @endif
- @if ($errors->any())
- <div class="error-list">
- <strong>Обнаружены ошибки:</strong>
- <ul>
- @foreach ($errors->all() as $error)
- <li>{{ $error }}</li>
- @endforeach
- </ul>
- </div>
- @endif
- <form method="POST" action="{{ route('form.submit') }}">
- @csrf {{-- Токен CSRF защиты --}}
- <div style="margin-bottom: 15px;">
- <label for="name" style="display: block; margin-bottom: 5px;">Имя:</label>
- <input type="text" id="name" name="name" value="{{ old('name') }}" required
- style="width: 100%; padding: 8px; box-sizing: border-box; border: 1px solid {{ $errors->has('name') ? 'red' : '#ccc' }};">
- @error('name')
- <small style="color: red;">{{ $message }}</small>
- @enderror
- </div>
- <div style="margin-bottom: 15px;">
- <label for="email" style="display: block; margin-bottom: 5px;">Email:</label>
- <input type="email" id="email" name="email" value="{{ old('email') }}" required
- style="width: 100%; padding: 8px; box-sizing: border-box; border: 1px solid {{ $errors->has('email') ? 'red' : '#ccc' }};">
- @error('email')
- <small style="color: red;">{{ $message }}</small>
- @enderror
- </div>
- <div style="margin-bottom: 15px;">
- <label for="message" style="display: block; margin-bottom: 5px;">Сообщение:</label>
- <textarea id="message" name="message" rows="5"
- style="width: 100%; padding: 8px; box-sizing: border-box; border: 1px solid {{ $errors->has('message') ? 'red' : '#ccc' }};">{{ old('message') }}</textarea>
- @error('message')
- <small style="color: red;">{{ $message }}</small>
- @enderror
- </div>
- <button type="submit" style="padding: 10px 15px; background-color: #3490dc; color: white; border: none; border-radius: 4px; cursor: pointer;">
- Отправить данные
- </button>
- </form>
- @endsection
|