Skip to content

Instantly share code, notes, and snippets.

View davidtrushkov's full-sized avatar

David Trushkov davidtrushkov

View GitHub Profile
class Chat extends Model {
protected $table = "chat";
protected $appends = ['gamertag', 'slug'];
/**
@davidtrushkov
davidtrushkov / gist:0f0707169771d68cc26851e5441a5058
Created June 28, 2016 03:26
Simple way to submit a form. For example in ( Laravel )
//$(document).ready(function(){ <--- Or you can use this
jQuery(function($) {
$("submit").click(function(){
var $form = $(this);
//var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),