mini\model() function

Documentation

Get model metadata (table name, primary key) for an entity class

Parses #[Table] and #[PrimaryKey] attributes. Results are cached per class. Follows the same pattern as validator() and metadata().

Signature

function model(string $class): mini\Database\ModelInfo

Parameters

NameTypeDefault
$class string required

Returns

mini\Database\ModelInfo

Source

src/Database/functions.php:179-183