PHPackages                             larajax/larajax - 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. [Framework](/categories/framework)
4. /
5. larajax/larajax

ActiveLibrary[Framework](/categories/framework)

larajax/larajax
===============

A small AJAX framework for Laravel, built to bring simplicity back to Laravel development.

v2.2.3(1mo ago)3541.4k—3.2%3[1 issues](https://github.com/larajax/larajax/issues)1MITJavaScriptPHP ^8.1CI passing

Since Sep 30Pushed 1w ago3 watchersCompare

[ Source](https://github.com/larajax/larajax)[ Packagist](https://packagist.org/packages/larajax/larajax)[ Docs](https://larajax.org)[ RSS](/packages/larajax-larajax/feed)WikiDiscussions main Synced 4d ago

READMEChangelog (1)DependenciesVersions (24)Used By (1)

Larajax – AJAX for Laravel
==========================

[](#larajax--ajax-for-laravel)

 [ ![Larajax](https://github.com/larajax/larajax/raw/main/logo.png?raw=true) ](https://larajax.org)

Larajax is a small AJAX framework for Laravel that keeps interactions inside controllers and responses.

It is designed for developers who like HTML-over-the-wire patterns, but want to stay close to Laravel’s normal request → controller → response flow, without building APIs or managing frontend state.

About Larajax
-------------

[](#about-larajax)

Larajax lets you define AJAX handlers directly in Laravel controllers and trigger them from HTML using `data-request` attributes.

No API routes. No fetch wiring. No frontend state layer.

```
// One route, multiple handlers
Route::any('/profile', [ProfileController::class, 'index']);

class ProfileController extends LarajaxController
{
    // Page Action
    public function index()
    {
        return view('pages.profile');
    }

    // AJAX Handlers
    public function onSave()
    {
        request()->validate([
            'first_name' => 'required'
        ]);

        // Return targeted DOM updates
        return ajax()->update([
            '#message' => "Save complete!"
        ]);
    }

    public function onDelete()
    {
        // ...
    }
}
```

```

        Save!

```

One route can expose multiple interaction handlers without splitting logic across endpoints.

Key ideas
---------

[](#key-ideas)

- Controller-based AJAX handlers
- HTML as the source of truth
- Targeted DOM updates
- Standard Laravel validation and CSRF handling
- Optional reusable component system

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

[](#installation)

Install the backend package:

```
composer require larajax/larajax
```

Install the frontend helper:

```
npm install larajax
```

Then import and initialize in your JavaScript entry file:

```
import { jax } from 'larajax';
window.jax = jax;
jax.start();
```

Background
----------

[](#background)

Larajax was extracted from the AJAX framework used in [October CMS](https://github.com/octobercms) and has been running in production applications for several years.

It is now packaged as a standalone Laravel library.

Resources
---------

[](#resources)

- Documentation and examples:
- Source code:

License
-------

[](#license)

Larajax is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance94

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~12 days

Total

20

Last Release

47d ago

Major Versions

v1.0.1 → v2.0.02025-12-20

### Community

Maintainers

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

---

Top Contributors

[![daftspunk](https://avatars.githubusercontent.com/u/1392869?v=4)](https://github.com/daftspunk "daftspunk (193 commits)")[![octoberapp](https://avatars.githubusercontent.com/u/6543374?v=4)](https://github.com/octoberapp "octoberapp (154 commits)")[![samgeorges](https://avatars.githubusercontent.com/u/4927493?v=4)](https://github.com/samgeorges "samgeorges (118 commits)")[![Metallizzer](https://avatars.githubusercontent.com/u/691719?v=4)](https://github.com/Metallizzer "Metallizzer (5 commits)")[![jacobdekeizer](https://avatars.githubusercontent.com/u/15017400?v=4)](https://github.com/jacobdekeizer "jacobdekeizer (2 commits)")[![FlusherDock1](https://avatars.githubusercontent.com/u/20070837?v=4)](https://github.com/FlusherDock1 "FlusherDock1 (1 commits)")[![tobias-kuendig](https://avatars.githubusercontent.com/u/8600029?v=4)](https://github.com/tobias-kuendig "tobias-kuendig (1 commits)")

### Embed Badge

![Health badge](/badges/larajax-larajax/health.svg)

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

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M300](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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