PHPackages                             mezon/ajax-application - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mezon/ajax-application

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mezon/ajax-application
======================

Simple class for creating ajax applications

1.0.1(4y ago)31.0k1MITPHPPHP &gt;=7.2.0

Since Mar 26Pushed 4y ago2 watchersCompare

[ Source](https://github.com/alexdodonov/mezon-ajax-application)[ Packagist](https://packagist.org/packages/mezon/ajax-application)[ Docs](https://github.com/alexdodonov/mezon-ajax-application)[ RSS](/packages/mezon-ajax-application/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (1)

Ajax Application
================

[](#ajax-application)

Intro
-----

[](#intro)

[Mezon Framework](https://github.com/alexdodonov/mezon) provides simple class for creating ajax applications. This class uses all functionality of the [Mezon Application Class](https://github.com/alexdodonov/mezon-application) also provides usefull functionality:

- automatic creation of the routes '{RouteName}' from methods like 'action{RouteName}';
- [routes setup from config](https://github.com/alexdodonov/mezon-application#loading-routes-from-config-file).
- [action messaging](https://github.com/alexdodonov/mezon-application#action-messages).

Installation
------------

[](#installation)

Just print in console

```
composer require mezon/ajax-application

```

And that's all )

Learn more
==========

[](#learn-more)

More information can be found here:

- [Mezon Framework](https://github.com/alexdodonov/mezon)
- [Twitter](https://twitter.com/mezonphp)
- [Dev.to](https://dev.to/alexdodonov)
- [Medium](https://gdvever.medium.com/)

It will be great if you will contribute something to this project. Documentation, sharing the project in your social media, bug fixing, refactoring, or even [submitting issue](https://github.com/alexdodonov/mezon-ajax-application/issues) with question or feature request. Thanks anyway ) I'll be very glad if you'll press "STAR" button )
=================================================================================================================================================================================================================================================================================================================================================

[](#it-will-be-great-if-you-will-contribute-something-to-this-project-documentation-sharing-the-project-in-your-social-media-bug-fixing-refactoring-or-even-submitting-issue-with-question-or-feature-request-thanks-anyway--ill-be-very-glad-if-youll-press-star-button-)

Exception handling
==================

[](#exception-handling)

For better debugging exception handling is performed in a special way. If the ajax request will be failed to process, then on the front end you will get JSON object with fields:

- *code* - code of the occured error;
- *message* - textual description of the occured error;
- *call\_stack* - call stack for the call wich lead to the error.

Finishing request processing
============================

[](#finishing-request-processing)

After finishing request processing you can mark it as successfull:

```
function ajaxRequestSuccess(): void
```

Wich will return `{"code": 0}`

Or return any other result:

```
function ajaxRequestResult($result): void
```

In this case $result will be encoded in JSON and outputted.

Or in case of the error you can call

```
function ajaxRequestError(string $message, int $code = - 1): void
```

Wich will return object `{"code": $code, "message": "message"}`

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~200 days

Total

2

Last Release

1671d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14943896?v=4)[alexdodonov](/maintainers/alexdodonov)[@alexdodonov](https://github.com/alexdodonov)

---

Top Contributors

[![alexdodonov](https://avatars.githubusercontent.com/u/14943896?v=4)](https://github.com/alexdodonov "alexdodonov (13 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mezon-ajax-application/health.svg)

```
[![Health](https://phpackages.com/badges/mezon-ajax-application/health.svg)](https://phpackages.com/packages/mezon-ajax-application)
```

###  Alternatives

[anlutro/l4-settings

Persistent settings in Laravel.

9312.4M19](/packages/anlutro-l4-settings)[godruoyi/php-snowflake

An ID Generator for PHP based on Snowflake Algorithm (Twitter announced).

8582.3M61](/packages/godruoyi-php-snowflake)[tuupola/ksuid

K-Sortable Globally Unique IDs

1081.2M4](/packages/tuupola-ksuid)[mcordingley/linearalgebra

Matrix math for PHP.

85146.3k1](/packages/mcordingley-linearalgebra)[hyva-themes/magento2-wysiwyg-svg

Allow SVGs and all tailwind classes in CMS block and page content.

17130.8k](/packages/hyva-themes-magento2-wysiwyg-svg)[syrian-open-source/laravel-youtube-iframe-generator

Laravel package allows you to generate an iframe tag with a video player depending on a youtube URL.

184.2k](/packages/syrian-open-source-laravel-youtube-iframe-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
