iTranslated by AI
The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🌿
Laravel 11: about and docs Commands
This article is for Day 1 of the Advent Calendar 2024: Investigating All Artisan Commands in Laravel 11.
In this post, I investigated the about and docs commands.
Environment
- PHP 8.4.1
- laravel/laravel 11.3.3
- laravel/framework 11.33.2
about
Displays basic information about the application.
php artisan about
When executed, it displays information across three sections: Environment, Cache, and Drivers.

| Option | Description |
|---|---|
--only[=ONLY] |
Displays only the specified section |
--json |
Displays in JSON format |
- You can specify sections with
--onlyregardless of case.
You can also specify multiple sections by separating them with commas.
php artisan about --only=Environment
php artisan about --only=environment,Cache

- By using
--json, information is displayed in JSON format; the--onlyoption can also be used in conjunction with it.
php artisan about --json
php artisan about --only=Environment --json

docs
Displays the Laravel documentation.
php artisan docs [<page> [<section>]]
When executed, a list for selecting the documentation you want to view will appear.

Upon selection, the URL of the documentation is displayed.
Additionally, depending on the execution environment, the selected documentation may be opened in a browser.

| Argument | Description |
|---|---|
page |
Specifies the documentation to open |
section |
Specifies the section within the documentation to open |
- You can open documentation by specifying just the
page, or both thepageandsection. - You can also specify just a part of the text; in that case, the first matching documentation found will be opened.
php artisan docs providers
php artisan docs database database-transactions
php artisan docs vi

Discussion