Documentation / @zerotal/core / facade/facades
facade/facades
The @zerotal/core/facades subpath — the framework's static-style facades.
A facade is a thin, always-safe-to-import handle over a named container
binding: every property access resolves the live instance from the running
application on demand, so facades hold no module-level state and stay correct
across boots. App reaches the application kernel and IoC container,
Config reads configuration, Events emits framework events, and
Artisan runs registered CLI commands in-process. All of them require
Application.create() (and, for resolution, boot()) to have run first.
Example
import { App, Config, Events, Artisan } from "@zerotal/core/facades";
const name = Config.get("app.name");
const users = await App.make("users");
await Events.emit(new UserRegistered(user.id));
const { code, output } = await Artisan.call("cache:clear");
References
App
Re-exports App
Config
Re-exports Config
Events
Re-exports Events
Artisan
Re-exports Artisan
ArtisanResult
Re-exports ArtisanResult