---
title: "Artisan commands — Attributes for Laravel | Roundly"
description: "List an owner’s attributes, prune old soft-deleted attributes, and inspect the package configuration with about."
url: https://roundly-consulting.com/open-source/docs/attributes-for-laravel/commands
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Attributes for Laravel](https://roundly-consulting.com/open-source/docs/attributes-for-laravel.md)

# Artisan commands

```bash
# List the attributes attached to an owner record:
php artisan attributes:list "App\Models\Product" 42

# Permanently delete soft-deleted attributes older than N days (default from config):
php artisan attributes:prune --days=30 --force
```

## attributes:list

Prints a Name / Type / Value / Meta table for one owner record, sorted by name. The first argument is the owner type — the model class, or the alias stored in owner\_type if you use a morph map; under a morph map a class name is mapped to its alias, so both work:

```bash
# With a morph map, the alias stored in owner_type works as well as the class:
php artisan attributes:list product 42
```

## attributes:prune

Permanently deletes soft-deleted attributes whose deleted\_at is older than --days (default: prune\_after\_days, 30). It asks for confirmation unless you pass --force, then runs Attributes::prune($days) — so schedule it with --force, or schedule the facade call directly. --days must be a whole number (0 or more); anything else fails the command instead of being read as 0 and purging every trashed attribute:

```php
// routes/console.php
use Illuminate\Support\Facades\Schedule;
use RoundlyConsulting\Attributes\Facades\Attributes;

Schedule::command('attributes:prune --force')->daily();

// ...or call what the command runs
Schedule::call(fn () => Attributes::prune())->daily();
```

## about

The package reports its configuration to Laravel’s about command — model, table, strict mode, history, prune age and the number of definitions (and how many are encrypted). Definition names are never printed:

```bash
php artisan about --only=attributes
```

## Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

[More ways to support, including crypto](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/attributes-for-laravel.md)
