Laravel 10.x以降のartisanの「docs」コマンドを解説します。
Description
Laravelの公式ドキュメント(英語)のURLを表示します。
Usage
php artisan docs [<page> [<section>]]Arguments
| オプション | 省略形 | 必須 | 説明 |
|---|---|---|---|
| page | – | – | 開くべきドキュメントページ |
| section | – | – | 開くべきページのセクション |
Example
no options
php artisan docs Which page would you like to open? [Installation]
Release Notes ...................................................................................................................... release notes
Upgrade Guide ...................................................................................................................... upgrade guide
Contribution Guide ............................................................................................................ contribution guide
Installation ........................................................................................................................ installation
Configuration ...................................................................................................................... configuration
:
:
>最後にプロンプトが出るので、見たいページを入力します。
page
php artisan docs installation INFO Opening the docs to: https://laravel.com/docs/10.x/installation.
WARN Unable to open the URL on your system. You will need to open it yourself or create a custom opener for your system. コマンドラインからなのでURLが開けないと怒られてますが、URLは表示されているのでブラウザにコピペしてアクセスが可能です。
また、ページ名の一部の文字でも大丈夫です。
php artisan docs va INFO Opening the docs to: https://laravel.com/docs/10.x/validation.
WARN Unable to open the URL on your system. You will need to open it yourself or create a custom opener for your system.


コメント