ModelScribe ships two Artisan commands:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/HypathStack/model-scribe/llms.txt
Use this file to discover all available pages before exploring further.
model-scribe:prune for enforcing your retention policy and removing stale audit records, and model-scribe:make-table for scaffolding the database migrations needed when you add a new named log store. Both commands are registered automatically by the package’s service provider — no additional setup is required.
model-scribe:prune
Deletes stale audit log entries from every table managed by the target driver, according to the retention policy set inconfig/model-scribe.php.
Signature
Prune stale ModelScribe audit log entries according to retention policy.
Options
| Option | Required | Description |
|---|---|---|
--driver | No | The name of the driver to prune (database, file, stack, or any custom driver). Omit to use the value of config('model-scribe.default'). |
Examples
Output
The command always exits successfully and prints the total number of records removed:permanent, or if the driver does not manage persistent storage (e.g. file), the count will be 0.
For a full explanation of how each driver handles pruning and how to schedule this command, see the Pruning guide.
model-scribe:make-table
Generates a Laravel database migration for an additional ModelScribe log table. Use this whenever you want to route a model’s audit entries to its own dedicated table via a named store. SignatureCreate a migration for an additional ModelScribe log table (store).
Arguments
| Argument | Required | Description |
|---|---|---|
name | Yes | The store name in snake_case (e.g. invoices, orders). This becomes the key in drivers.database.stores and the value you assign to $auditLogName on your model. |
Options
| Option | Required | Description |
|---|---|---|
--table | No | Override the generated table name. Defaults to {name}_scribe_logs (e.g. invoices_scribe_logs). |
Examples
Follow-up steps
After running the command, complete the setup in three steps:Register the store in config
Open
config/model-scribe.php and add the new store under drivers.database.stores:For the full guide on routing models to named stores, including multi-table stores, guard-based routing, and cross-database configurations, see the Multi-table routing reference.