Route::filter('ajax_check', function()
{
       if (Request::ajax())
      {
         return true;
      }
});

Route::get('/add', array('before' => 'ajax_check', function()
{
        return 'The Request is AJAX!';
}));
Hosted with ❤ by CODENEXT view on codenext