token(); } /** * Determine if the current request is an AJAX request. * * @return bool */ public static function ajax() { if ( ! isset($_SERVER['HTTP_X_REQUESTED_WITH'])) return false; return strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest'; } /** * Get the route handling the current request. * * @return Route */ public static function route() { return static::$route; } }