<form>
<div class="form-group">
<label for="name">Имя</label>
<input type="text" name="name" class="form-control">
<div>{{$errors->first('name')}}</div>
</div>
<div class="form-group">
<label for="family">Фамилия</label>
<input type="text" name="family" class="form-control">
<div>{{$errors->first('family')}}</div>
</div>
<div class="form-group">
<label for="phone">Номер</label>
<input type="text" name="phone" class="form-control">
<div>{{$errors->first('phone')}}</div>
</div>
<div class="form-group">
<label for="levelStudy">Уровень образования</label>
<select name="levelStudy" id="levelStudy" class="form-control">
<option value="Bachelor">Bachelor</option>
<option value="Master">Master</option>
<option value="PhD">PhD</option>
</select>
<div>{{$errors->first('levelStudy')}}</div>
</div>
<button class="btn btn-success btn-submit">Submit</button>
</form>
<div class=" message alert alert-success" role="alert">
<strong>Well done!</strong> You success <a href="#" class="alert-link">this important alert message</a>.
</div>
<div class="errors alert alert-danger" role="alert">
<strong>Oh snap!</strong> Change a few things up and try submitting again.
</div>
<script type="text/javascript">
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$(".btn-submit").click(function(e){
e.preventDefault();
var name = $("input[name=name]").val();
var family = $("input[name=family]").val();
var phone = $("input[name=phone]").val();
var levelStudy = $("select[name=levelStudy]").val();
$.ajax({
type:'POST',
url:'/taskone',
data:{name:name, family:family, phone:phone,levelStudy:levelStudy},
success:function(data){
alert(data.success);
}
});
});
</script>
слямзил код не знаю где ПАМАГИТЕЕЕ
???<button class="btn btn-success btn-submit">Submit</button>
<button type="submit" class="btn btn-success btn-submit">Submit</button>
$(".btn-submit").click(function(e){
$("form").submit(function(e){
$("#FORMA").submit(function(e){
return false;
});
$( "#KNOPKA" ).click(function() {
$( "#FORMA" ).submit();
});