Cachet 3.x is under development. Learn more.

Laravel Artisan Cheatsheet API

In October 2023, I updated the Laravel Artisan Cheatsheet to Nuxt 3.x. Along with several other changes, I wanted to add a new feature to the site, an API.

Versions

The /api/versions endpoint simply lists all versions of Laravel supported by the site:

[
  "10.x",
  "9.x",
  "8.x",
  "7.x",
  "6.x",
  "5.x"
]

When Laravel 11.x is released, it will of course be available here too.

Packages

The /api/packages endpoint is similar in that it lists all packages supported by the site:

[
    "laravel/breeze",
    "laravel/cashier",
    "laravel/cashier-paddle",
    "laravel/dusk",
    "laravel/envoy",
    "laravel/fortify",
    "laravel/horizon",
    "laravel/jetstream",
    "laravel/passport",
    "laravel/pennant",
    "laravel/nova",
    "laravel/octane",
    "laravel/pulse",
    "laravel/sail",
    "laravel/sanctum",
    "laravel/scout",
    "laravel/socialite",
    "laravel/telescope",
    "livewire/livewire",
    "inertiajs/inertia-laravel"
]

All packages are listed by their Composer package name, not their display name. When building the documentation for each Laravel version, we'll attempt to install the packages listed on this endpoint. Of course, not all packages are available due to different versioning constraints.

Commands

To find the commands available for each version of Laravel, you may use the /api/{version} endpoint. For example, /api/10.x will return all commands for Laravel 10.x.

[
  {
    "name":"about",
    "description":"Display basic information about your application",
    "synopsis":"about [--only [ONLY]] [--json]",
    "definition":{},
    "aliases":[],
    "arguments":[],
    "options":[
      {
        "name":"only",
        "description":"The section to display",
        "value_required":false,
        "value_optional":true
      },
      {
        "name":"json",
        "description":"Output the information as JSON",
        "value_required":false,
        "value_optional":false
      }
    ]
  }
  // More commands...
]

I'd love to see what you can build with this API. If you do build something, please let me know on X (Twitter)!