<form action="{{ Route('car.store') }}" method="post">
class Car extends Model
{
protected $table = 'cars';
protected $fillable = ['car'];
}
protected $fillable = ['car', 'mark', 'color', 'age', 'power'];
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
selectedIndexPath = tableView.indexPathForSelectedRow
tableView.beginUpdates()
tableView.endUpdates()
}
override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
if selectedIndexPath == indexPath {
return 107
} else {
return 50
}
}
var counter = document.querySelector('#counter');
counter.count = 0;
counter.addEventListener('click', function (event) {
if (event.target.tagName == 'button-element') {
counter.count++;
counter.textContent = counter.count;
}
});
.main {
width: calc(100% - 100px);
}
$('document').ready(function () {
$('#loading').on("click",function (event) {
event.preventDefault();
var ids = $("textarea[name='text']").val();
var name= $("input[name='name']").val();
var btn = $(this);btn.button('loading');
$.ajax({
url: "say/add",
cache: false,
data: { text: ids, name:name },
type: "POST",
success: function(html) { $('#say').html(html);}
}).always(function () {
btn.button('reset')
});
return false;
});
});
<meta name="_token" content="<?php echo csrf_token(); ?>">
var csrftoken = $('meta[name=_token]').attr('content');
$.ajaxSetup({
beforeSend: function (xhr, settings) {
if (!/^(GET|HEAD|OPTIONS|TRACE)$/i.test(settings.type)) {
xhr.setRequestHeader("X-CSRFToken", csrftoken)
}
}
});
<div id="content">
<div data-id="3">...</div>
<div data-id="5">...</div>
...
<div data-id="4">...</div>
</div>
var ids = $('#content [data-id]').map(function () {
return $(this).data('id');
}).toArray();
$.ajax({
...
data: { ids: ids }
})