Official Laravel source
AttributeIlluminate\Console\Attributes\Usage

#[Usage]

Defines the usage example for an Artisan command.

Available since

Laravel 13.0

Targets

class

Parameters

  • $usagestring

    A string describing how to use the command.

Practical usage

use Illuminate\Console\Command;
use Illuminate\Console\Attributes\Usage;

#[Usage('billing:sync --help')]
class SyncBillingData extends Command
{
    protected $signature = 'billing:sync';

    public function handle(): int
    {
        //...
        return self::SUCCESS;
    }
}