⬡ Lacelium
⌘K
Version 2.x ▾

API Reference

Introduction

This page provides a quick reference cheat sheet for the primary global helpers, core facades, and utility functions available throughout the Lacelium framework.

Core Application Helpers

Helper Signature Description
app_config() app_config(?string $key = null, mixed $default = null) Retrieve or set configuration options using dot syntax (e.g. app.timezone).
app_env() app_env(): string Get the active application environment (local, production, testing).
app_locale() app_locale(): string Get the active translation locale code (e.g. en, es).
app_set_locale() app_set_locale(string $locale): void Change the active language locale at runtime.
base_path() base_path(string $path = ''): string Get the absolute path to the project root directory.
storage_path() storage_path(string $path = ''): string Get the path to the storage folder.
public_path() public_path(string $path = ''): string Get the path to the web-facing public directory.

String & Utility Helpers

Helper Signature Description
uuidV4() uuidV4(): string Generate a cryptographically secure Version 4 UUID string.
slug() slug(string $title, string $separator = '-'): string Generate a URL-friendly slug from an arbitrary UTF-8 string.
arrayGet() arrayGet(array $array, string $key, mixed $default = null) Retrieve a value from a deeply nested array using dot notation.
fileUpload() fileUpload($file, string $dir, array $options = []): string Validate MIME signature and securely move an uploaded file.
csrf_token() csrf_token(): string Retrieve the current active user session's CSRF token.
csrf_field() csrf_field(): string Generate a hidden HTML <input> containing the CSRF token.

Dipperlook Service Facades

Service Accessor Primary Methods
Cache cache() get(), put(), remember(), forget(), tags(), flush()
Storage storage(?string $disk = null) get(), put(), delete(), exists(), url()
HTTP Client http() or Client::* get(), post(), withToken(), retry(), timeout()
Database db() or DB::* table(), select(), insert(), transaction()

Next Steps