Laravel 10.x以降のartisanの「model:show」コマンドを解説します。
Description
Eloquentモデルに関する情報を表示します。
Usage
php artisan model:show [--database [DATABASE]] [--json] [--] <model>Arguments
| 引数 | 必須 | 説明 | 
|---|---|---|
| model | 必須 | 表示するEloquentモデル | 
Options
| オプション | 省略形 | 必須 | 説明 | 
|---|---|---|---|
| database | – | – | 使用するデータベース接続 | 
| json | – | – | JSONで出力する | 
Example
no options
php artisan model:show User  App\Models\User ..................................................................................................................................  
  Database ................................................................................................................................... mysql  
  Table ...................................................................................................................................... users  
  Attributes ........................................................................................................................... type / cast  
  id increments, unique ...................................................................................................... bigint unsigned / int  
  name fillable ........................................................................................................................ string(255)  
  email unique, fillable ............................................................................................................... string(255)  
  email_verified_at nullable ................................................................................................... datetime / datetime  
  password fillable, hidden ............................................................................................................ string(255)  
  remember_token nullable, hidden ...................................................................................................... string(100)  
  created_at nullable .......................................................................................................... datetime / datetime  
  updated_at nullable .......................................................................................................... datetime / datetime  
  Relations ........................................................................................................................................  
  tokens MorphMany ............................................................................................. Laravel\Sanctum\PersonalAccessToken  
  notifications MorphMany ............................................................................ Illuminate\Notifications\DatabaseNotification  
  Observers ........................................................................................................................................  Source
10.x
framework/src/Illuminate/Database/Console/ShowModelCommand.php at 11.x · laravel/framework
The Laravel Framework. Contribute to laravel/framework development by creating an account on GitHub.
11.x
framework/src/Illuminate/Database/Console/ShowModelCommand.php at 11.x · laravel/framework
The Laravel Framework. Contribute to laravel/framework development by creating an account on GitHub.
 
  
  
  
  

コメント