Answer the question
In order to leave comments, you need to log in
How to solve form error in Laravel?
I have a form:
@extends('layouts.app')
@section('content')
<div class="jumbotron text-center">
<h1>{{$title}}</h1>
<p>От северного до южного полюса!</p>
@if (Route::has('login'))
@auth
<form class="" enctype="multipart/form-data" action="/searchtour" method="post">
<input type="text" class="town-input form-control" name="fromTown" placeholder="Город вылета" required>
<input type="text" class="town-input form-control" name="toTown" placeholder="Город прилета" required>
<input type="date" class="form-control" name="tripStart" placeholder="Дата вылета" required>
<input type="number" class="form-control" name="tripDays" placeholder="Длительность" required>
<input type="number" name="hotelStars" min="1" max="5" step="1" placeholder="1-5 звезд" required>
<input type="text" data-people="1;0" placeholder="1 взр." required>
<input type="submit" value="Поиск" class="btn-lg">
</form>
@else
<a class="btn btn-primary btn-lg" href="{{ route('login') }}">Войти</a>
<a class="btn btn-success btn-lg" href="{{ route('register') }}">Регистрация</a>
@endauth
@endif
</div>
@endsection
Route::apiResource('searchtour','SearchController');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question