public function isAjax()
    {
        if (!isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
            return false;
        }

        $xhr_obj = Str::lower($_SERVER['HTTP_X_REQUESTED_WITH']);

        if ($xhr_obj == 'xmlhttprequest' || $xhr_obj == 'activexobject') {
            return true;
        }

        return false;
    }
public function isAjax()
    {
        if (!isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
            return false;
        }

        $xhr_obj = Str::lower($_SERVER['HTTP_X_REQUESTED_WITH']);

        if ($xhr_obj == 'xmlhttprequest' || $xhr_obj == 'activexobject') {
            return true;
        }

        return false;
    }
public function isAjax ( ) { if ( ! isset ( $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] ) ) { return false ; } $ xhr_obj = Str :: lower ( $ _SERVER [ 'HTTP_X_REQUESTED_WITH' ] ) ; if ( $ xhr_obj == 'xmlhttprequest' || $ xhr_obj == 'activexobject' ) { return true ; } return false ; }
Check if we are in the case of an AJAX request.

@return boolean
Check if we are in the case of an AJAX request .