Skip to content

Instantly share code, notes, and snippets.

@davestewart
davestewart / laravel-ajax.php
Created April 29, 2015 23:00
A lightweight example to get Laravel 5 users up to speed with jQuery AJAX
/**
* Laravel / jQuery AJAX code example
* See conversation here: http://laravel.io/forum/04-29-2015-people-asking-about-jquery-ajax
*
* Drop this code into your App/Http/routes.php file, and go to /ajax/view in your browser
* Be sure to bring up the JavaScript console by pressing F12.
*/
// This is your View AJAX route - load this in your browser
Route::get('/ajax/view', function () {