|
|
@@ -0,0 +1,170 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="ru">
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>Тест Laravel</title>
|
|
|
+ <style>
|
|
|
+ * { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
+ body {
|
|
|
+ font-family: Arial, sans-serif;
|
|
|
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
|
+ min-height: 100vh;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ padding: 20px;
|
|
|
+ }
|
|
|
+ .container {
|
|
|
+ background: white;
|
|
|
+ padding: 40px;
|
|
|
+ border-radius: 10px;
|
|
|
+ box-shadow: 0 10px 40px rgba(0,0,0,0.2);
|
|
|
+ max-width: 500px;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ h1 {
|
|
|
+ color: #333;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .subtitle {
|
|
|
+ color: #666;
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 30px;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ .form-group {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+ label {
|
|
|
+ display: block;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ color: #333;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ input, textarea {
|
|
|
+ width: 100%;
|
|
|
+ padding: 12px;
|
|
|
+ border: 2px solid #e1e1e1;
|
|
|
+ border-radius: 5px;
|
|
|
+ font-size: 14px;
|
|
|
+ transition: border-color 0.3s;
|
|
|
+ }
|
|
|
+ input:focus, textarea:focus {
|
|
|
+ outline: none;
|
|
|
+ border-color: #667eea;
|
|
|
+ }
|
|
|
+ textarea {
|
|
|
+ resize: vertical;
|
|
|
+ min-height: 100px;
|
|
|
+ }
|
|
|
+ .btn {
|
|
|
+ width: 100%;
|
|
|
+ padding: 12px;
|
|
|
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
|
+ color: white;
|
|
|
+ border: none;
|
|
|
+ border-radius: 5px;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: transform 0.2s;
|
|
|
+ }
|
|
|
+ .btn:hover {
|
|
|
+ transform: translateY(-2px);
|
|
|
+ }
|
|
|
+ .alert {
|
|
|
+ padding: 15px;
|
|
|
+ border-radius: 5px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+ .alert-success {
|
|
|
+ background: #d4edda;
|
|
|
+ color: #155724;
|
|
|
+ border: 1px solid #c3e6cb;
|
|
|
+ }
|
|
|
+ .alert-error {
|
|
|
+ background: #f8d7da;
|
|
|
+ color: #721c24;
|
|
|
+ border: 1px solid #f5c6cb;
|
|
|
+ }
|
|
|
+ .error-text {
|
|
|
+ color: #e74c3c;
|
|
|
+ font-size: 12px;
|
|
|
+ margin-top: 5px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+ <div class="container">
|
|
|
+ <h1>Laravel Форма</h1>
|
|
|
+ <p class="subtitle">Laravel {{ app()->version() }} | PHP {{ phpversion() }}</p>
|
|
|
+
|
|
|
+ @if(session('success'))
|
|
|
+ <div class="alert alert-success">
|
|
|
+ {{ session('success') }}
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+
|
|
|
+ @if($errors->any())
|
|
|
+ <div class="alert alert-error">
|
|
|
+ <strong>Ошибки:</strong>
|
|
|
+ <ul style="margin-top: 10px; margin-left: 20px;">
|
|
|
+ @foreach($errors->all() as $error)
|
|
|
+ <li>{{ $error }}</li>
|
|
|
+ @endforeach
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+
|
|
|
+ <form action="{{ route('form.submit') }}" method="POST">
|
|
|
+ @csrf
|
|
|
+
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="name">Имя:</label>
|
|
|
+ <input
|
|
|
+ type="text"
|
|
|
+ id="name"
|
|
|
+ name="name"
|
|
|
+ value="{{ old('name') }}"
|
|
|
+ placeholder="Введите ваше имя"
|
|
|
+ >
|
|
|
+ @error('name')
|
|
|
+ <div class="error-text">{{ $message }}</div>
|
|
|
+ @enderror
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="email">Email:</label>
|
|
|
+ <input
|
|
|
+ type="email"
|
|
|
+ id="email"
|
|
|
+ name="email"
|
|
|
+ value="{{ old('email') }}"
|
|
|
+ placeholder="your@email.com"
|
|
|
+ >
|
|
|
+ @error('email')
|
|
|
+ <div class="error-text">{{ $message }}</div>
|
|
|
+ @enderror
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="message">Сообщение:</label>
|
|
|
+ <textarea
|
|
|
+ id="message"
|
|
|
+ name="message"
|
|
|
+ placeholder="Минимум 10 символов..."
|
|
|
+ >{{ old('message') }}</textarea>
|
|
|
+ @error('message')
|
|
|
+ <div class="error-text">{{ $message }}</div>
|
|
|
+ @enderror
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <button type="submit" class="btn">
|
|
|
+ Отправить форму
|
|
|
+ </button>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</body>
|
|
|
+</html>
|