Docs Navigation Open

sApi

Use sApi when a project needs a clean API layer for endpoints, integrations, and application workflows.

sApi is the modern API package for Evolution CMS when the project needs a real endpoint layer instead of embedding JSON logic in snippets.

When to Use It

  • frontend apps calling JSON endpoints
  • external integrations
  • webhook receivers
  • versioned API routes
  • middleware-aware request handling

What It Usually Gives the Project

  • clear route definitions
  • controllers instead of snippet-only endpoint logic
  • authentication and middleware integration
  • easier testing and maintenance
Route::prefix('api/v1')->group(function () {
    Route::get('/products', [ProductApiController::class, 'index']);
    Route::post('/orders', [OrderApiController::class, 'store']);
});

Use sApi when API behavior is a product surface of its own. If the site only needs one simple AJAX helper, a small controller or package route may be enough.

See the Platform, API & Automation extras group.

Previous

API Overview

Use the classic API, Eloquent models, routes, validators, and response helpers according to the actual job.

Next

Authentication

Separate manager auth, web-user auth, protected content, and passkey flows instead of treating them as one thing.