Skip to content

Instantly share code, notes, and snippets.

@cereal-s
Forked from JeremiahTolbert/ajax-filter.php
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cereal-s/c3d61b3ce4073ba3c99c to your computer and use it in GitHub Desktop.
Save cereal-s/c3d61b3ce4073ba3c99c to your computer and use it in GitHub Desktop.
<?php
# AJAX filter for Laravel 4.2
# this goes in app/start/global.php
Route::filter('ajax', function($route, $request) {
if ($request->ajax() === FALSE)
return App::abort(500);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment