【Laravel】artisanのdocsコマンドを解説

Laravel

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.  

Follow me!

コメント

PAGE TOP
タイトルとURLをコピーしました