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 ........................................................................................................................................
コメント