Skip to content

Commit 7b0a769

Browse files
committed
Proofreading
1 parent 0ccc1ab commit 7b0a769

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Larajax is a small AJAX library for Laravel, built to simplify dynamic interacti
44

55
It lets your HTML call **Laravel controller methods** directly using `data-request`. No public API routes. No duplicated endpoints. Each controller keeps its own actions.
66

7-
You define small, focused handlers and trigger them straight from the view. They behave like API calls but live alongside your page controllersno separate API layer needed.
7+
You define small, focused handlers and trigger them straight from the view. They behave like API calls but live alongside your page controllers, with no separate API layer needed.
88

99
On the browser side, Larajax ships with a **lightweight JavaScript library**. Your markup fires the action. Larajax sends the request and applies the response. You can also call handlers programmatically with `jax.ajax()` when needed.
1010

@@ -102,6 +102,8 @@ Once actions are local to a page instead of global, a natural question follows
102102

103103
### Components Solve Reusability
104104

105+
Components allow page-local reuse without introducing shared routes or shared controllers.
106+
105107
Every controller supports a `$components` property to define reusable behavior. Any AJAX handlers found in those component classes are automatically registered on the controller that includes them.
106108

107109
```php
@@ -185,6 +187,8 @@ Larajax provides a global `ajax()` helper that returns a `Larajax\Classes\AjaxRe
185187

186188
Instead of returning raw JSON and handling it manually on the client, you describe the outcome directly in the controller.
187189

190+
A handler can return multiple browser instructions in a single response.
191+
188192
```php
189193
function onSave()
190194
{

0 commit comments

Comments
 (0)