Docs Navigation Open

API Overview

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

Main Integration Surfaces

  • Classic Evolution API — parser helpers, chunks, snippets, placeholders, mail, and URL generation
  • Eloquent models — resources, TVs, templates, users, settings, and package data
  • Routes and controllers — HTTP endpoints, validation, and JSON responses
  • Packages — domain-specific integrations such as APIs, tasks, auth, AI, and commerce

Classic Helper Examples

$url = evo()->makeUrl(44);
$chunk = evo()->getChunk('site_header');
$output = evo()->runSnippet('DocLister', ['parents' => 45]);
evo()->setPlaceholder('total', 12);
evo()->sendmail(['to' => 'team@example.com', 'subject' => 'Hello']);

Model Example

use EvolutionCMS\Models\SiteContent;

$news = SiteContent::query()
    ->where('template', 5)
    ->where('published', 1)
    ->orderBy('createdon', 'desc')
    ->get();

When to Move Beyond Snippets

If the project exposes structured endpoints, business logic, middleware, or integration workflows, move that logic into controllers or packages instead of growing one giant snippet.

See sApi, Email and Webhooks, and AI and MCP.

Previous

AI and MCP

Current AI and MCP tooling in Evolution centers on eAi, eMCP, and adjacent workflow packages.

Next

sApi

Use sApi for structured endpoints, versioned APIs, middleware, auth, and integration-facing routes.