Skip to content

Instantly share code, notes, and snippets.

@RimonEkjon
RimonEkjon / jquery.ajaxSubmit.js
Created August 26, 2014 04:25 — forked from mollwe/jquery.ajaxSubmit.js
Gets all input values within form and submits form with ajax.
/*!
* jquery.ajaxSubmit.js - v 0.9.3 (2011-11-29)
* Copyright (C) 2011 by Adam Ydenius (mollwe@gmail.com) | http://mollwe.se
* Dual licensed under MIT and GPL.
*//*
* Gets all input (with name attribute) values within form and submits form with ajax.
* First argument, options, is object with:
* Properties:
* - url: override form action.
* - method: override form method.
/**
*
* @param unknown_type $form
* @param unknown_type $form_state
* @return multitype:string NULL
*/
function multifiles_example_form($form, &$form_state) {
$form['#tree'] = TRUE;
/**
*
* @param unknown_type $form
* @param unknown_type $form_state
* @return multitype:string NULL
*/
function multifiles_example_form($form, &$form_state) {
$form['#tree'] = TRUE;
jQuery.ajaxSetup({
'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")}
})
//Send data via get if JS enabled
jQuery.fn.getWithAjax = function() {
this.click(function() {
$.get($(this).attr("href"), $(this).serialize(), null, "script");
return false;
/**
*
* @param unknown_type $form
* @param unknown_type $form_state
* @return multitype:string NULL
*/
function multifiles_example_form($form, &$form_state) {
$form['#tree'] = TRUE;
@RimonEkjon
RimonEkjon / Laravel- Quick Project
Created August 26, 2014 04:40 — forked from mattkirwan/Quick Project
Creating a Quick Project
#!/bin/bash
function install_laravel() {
echo "Installing Laravel into '$project_name'..."
wget https://github.com/laravel/laravel/archive/master.zip ./
unzip ./master.zip
@RimonEkjon
RimonEkjon / Laravel- master.blade.php
Last active August 29, 2015 14:05 — forked from AndriyShepitsen/master.blade.php
Laravel Link to Named Route with Text Only
{{link_to_route('routeName', 'Visible_Text_of_the_Laravel_Link');}}
curl -sS getcomposer.org/installer | php -d detect_unicode=Off
composer create-project laravel/laravel THE_PROJ_DIRECOTRY_NAME_YOU_WANT --prefer-dist
or using the new phar, copy it into usr/local/bin
run :
$ chmod +x /usr/local/bin/laravel
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.1.*",
"components/bootstrap": "3.0.2"
},
"require-dev": {
@RimonEkjon
RimonEkjon / Laravel - helpers.php
Last active August 29, 2015 14:05 — forked from ericlbarnes/helpers.php
Query Helper
// DB Dumpers
DB::listen(function($sql)
{
var_dump($sql);
});
Event::listen('laravel.query', function($sql)
{
var_dump($sql);